[mapguide-commits] r7024 - in trunk/Tools/Maestro: Maestro OSGeo.MapGuide.MaestroAPI/ObjectModels
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Sep 18 04:10:23 PDT 2012
Author: jng
Date: 2012-09-18 04:10:23 -0700 (Tue, 18 Sep 2012)
New Revision: 7024
Modified:
trunk/Tools/Maestro/Maestro/changelog.txt
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinitionInterfaces.cs
Log:
#2125: Renaming a dynamic group in a Map Definition updated any child layers, but not child group. This submission fixes that.
Modified: trunk/Tools/Maestro/Maestro/changelog.txt
===================================================================
--- trunk/Tools/Maestro/Maestro/changelog.txt 2012-09-17 16:35:47 UTC (rev 7023)
+++ trunk/Tools/Maestro/Maestro/changelog.txt 2012-09-18 11:10:23 UTC (rev 7024)
@@ -13,6 +13,7 @@
- Missing label in new fusion templates
- Fusion editor improvements
- Can view widget info in the Generic Widget XML editor
+- Fix: Updating a dynamic group name in a Map Definition did not update child groups
- Fix: Have RDBMS Feature Source editor fill a fake password when opening a RDBMS feature source with secured credentials to give appearance of a password filled in.
- Fix: Theming using first rule as template now preserves transparency
- Fix: Restore missing checkbox for toggling Tiled Layer Group visibility in a Map Definition
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinitionInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinitionInterfaces.cs 2012-09-17 16:35:47 UTC (rev 7023)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinitionInterfaces.cs 2012-09-18 11:10:23 UTC (rev 7024)
@@ -458,10 +458,15 @@
Check.NotEmpty(oldGroupName, "oldGroupName"); //NOXLATE
Check.NotEmpty(newGroupName, "newGroupName"); //NOXLATE
var layers = map.GetLayersForGroup(oldGroupName);
+ var groups = map.GetGroupsForGroup(oldGroupName);
foreach (var l in layers)
{
l.Group = newGroupName;
}
+ foreach (var g in groups)
+ {
+ g.Group = newGroupName;
+ }
}
/// <summary>
@@ -594,6 +599,22 @@
}
/// <summary>
+ /// Gets all the groups that belong to the specified group
+ /// </summary>
+ /// <param name="map"></param>
+ /// <param name="name"></param>
+ /// <returns></returns>
+ public static IEnumerable<IMapLayerGroup> GetGroupsForGroup(this IMapDefinition map, string name)
+ {
+ Check.NotNull(map, "map"); //NOXLATE
+ foreach (var group in map.MapLayerGroup)
+ {
+ if (name.Equals(group.Group))
+ yield return group;
+ }
+ }
+
+ /// <summary>
/// Gets all that layers that do not belong to a group
/// </summary>
/// <param name="map"></param>
More information about the mapguide-commits
mailing list