aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels
diff options
context:
space:
mode:
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.cs4
1 files changed, 2 insertions, 2 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 d52daaea2..c4850deb8 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
@@ -615,7 +615,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
_all_sites = await ActiveMachineAdapter.Context.Sites.ToListAsync();
- Sites = ActiveMachine.Organization != null ? _all_sites.Where(x => ActiveMachine.Organization.Sites.All(y => y.OrganizationGuid == x.OrganizationGuid)).ToList() : new List<Site>() ;
+ Sites = ActiveMachine.Organization != null ? _all_sites.Where(x => x.OrganizationGuid == ActiveMachine.OrganizationGuid).ToList() : new List<Site>() ;
Sites.Insert(0, new Site() { Name = "NONE", ID = -1 });
SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid);
@@ -1004,7 +1004,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
private void ActiveMachine_OrganizationChanged(object sender, Organization e)
{
- var sites = ActiveMachine.Organization != null ? _all_sites.Where(x => ActiveMachine.Organization.Sites.All(y => y.OrganizationGuid == x.OrganizationGuid)).ToList() : new List<Site>();
+ var sites = ActiveMachine.Organization != null ? _all_sites.Where(x => x.OrganizationGuid == ActiveMachine.OrganizationGuid).ToList() : new List<Site>();
sites.Insert(0, new Site() { Name = "NONE", ID = -1 });
Sites = sites;
SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid);