[mapguide-commits] r7025 - in branches/maestro-4.0.x: Maestro OSGeo.MapGuide.MaestroAPI/ObjectModels
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Sep 18 04:17:13 PDT 2012
Author: jng
Date: 2012-09-18 04:17:13 -0700 (Tue, 18 Sep 2012)
New Revision: 7025
Modified:
branches/maestro-4.0.x/Maestro/changelog.txt
branches/maestro-4.0.x/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: branches/maestro-4.0.x/Maestro/changelog.txt
===================================================================
--- branches/maestro-4.0.x/Maestro/changelog.txt 2012-09-18 11:10:23 UTC (rev 7024)
+++ branches/maestro-4.0.x/Maestro/changelog.txt 2012-09-18 11:17:13 UTC (rev 7025)
@@ -3,6 +3,7 @@
- Use UNIQUE() for fetching distinct values in Expression Editor
- Fusion editor fixes
- OSM support
+ - 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: Duplicating vector scale ranges not creating true clones
- Fix: Prevent Map Definition groups from being dragged and dropped into its child groups/layers
Modified: branches/maestro-4.0.x/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinitionInterfaces.cs
===================================================================
--- branches/maestro-4.0.x/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinitionInterfaces.cs 2012-09-18 11:10:23 UTC (rev 7024)
+++ branches/maestro-4.0.x/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinitionInterfaces.cs 2012-09-18 11:17:13 UTC (rev 7025)
@@ -448,10 +448,15 @@
Check.NotEmpty(oldGroupName, "oldGroupName");
Check.NotEmpty(newGroupName, "newGroupName");
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>
@@ -584,6 +589,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