aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
index bd08e3e7c..e0d99d0f0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
@@ -610,8 +610,10 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
}
}
- Sites = await ActiveMachineAdapter.Context.Sites.ToListAsync();
- Sites.Insert(0, new Site() { Name = "NONE", ID = -1 });
+ var sites = await ActiveMachineAdapter.Context.Sites.ToListAsync();
+ sites.Insert(0, new Site() { Name = "NONE", ID = -1 });
+
+ Sites = sites;
SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid);
ColorCalibrationViewVM = new ColorCalibrationViewVM(_notification, ActiveMachine, _activeMachineAdapter.Context)
@@ -627,8 +629,11 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
HardwareConfigurationViewVM.Init(ActiveMachine.Configuration);
}
- await MachineUpdatesViewVM.Init(ActiveMachine, ActiveMachineAdapter.Context);
- TupViewVM.Init(ActiveMachine);
+ if (!IsNewMachine)
+ {
+ await MachineUpdatesViewVM.Init(ActiveMachine, ActiveMachineAdapter.Context);
+ TupViewVM.Init(ActiveMachine);
+ }
ActiveMachine.Configuration.HardwareVersionChanged += Configuration_HardwareVersionChanged;