aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-01-26 15:47:48 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-01-26 15:47:48 +0200
commit494d0f61b0800d96b1694930388397d9d9318d58 (patch)
tree03974e5c2d68da23e65c010885329cc93bc6028c /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels
parenta4d662dcdcde9ea06de758ede42657a4be38b84b (diff)
parent5750efe8f8c56d6fc6e1b9673983def324124a8b (diff)
downloadTango-494d0f61b0800d96b1694930388397d9d9318d58.tar.gz
Tango-494d0f61b0800d96b1694930388397d9d9318d58.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels')
-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;