[mapguide-commits] r6507 - trunk/Tools/Maestro/Maestro.Editors/MapDefinition

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Feb 13 09:07:27 EST 2012


Author: jng
Date: 2012-02-13 06:07:27 -0800 (Mon, 13 Feb 2012)
New Revision: 6507

Modified:
   trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapTreeModels.cs
Log:
#1941: Re-order layer/group display to match the AJAX viewer legend. (ie. un-grouped layers before groups)

Modified: trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapTreeModels.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapTreeModels.cs	2012-02-13 13:50:41 UTC (rev 6506)
+++ trunk/Tools/Maestro/Maestro.Editors/MapDefinition/MapTreeModels.cs	2012-02-13 14:07:27 UTC (rev 6507)
@@ -215,16 +215,15 @@
         {
             if (treePath.IsEmpty())
             {
+                foreach (var layer in _map.GetLayersWithoutGroups())
+                {
+                    yield return new LayerItem(layer);
+                }
                 foreach (var group in _map.MapLayerGroup)
                 {
                     if (string.IsNullOrEmpty(group.Group))
                         yield return new GroupItem(group);
                 }
-
-                foreach (var layer in _map.GetLayersWithoutGroups())
-                {
-                    yield return new LayerItem(layer);
-                }
             }
             else
             {
@@ -232,16 +231,15 @@
                 if (gitem != null)
                 {
                     var group = gitem.Tag;
+                    foreach (var l in _map.GetLayersForGroup(group.Name))
+                    {
+                        yield return new LayerItem(l);
+                    }
                     foreach (var g in _map.MapLayerGroup)
                     {
                         if (g.Group == group.Name)
                             yield return new GroupItem(g);
                     }
-
-                    foreach (var l in _map.GetLayersForGroup(gitem.Tag.Name))
-                    {
-                        yield return new LayerItem(l);
-                    }
                 }
                 else
                 {



More information about the mapguide-commits mailing list