[mapguide-commits] r7059 - in branches/maestro-4.0.x: . Maestro.Editors/MapDefinition
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Oct 1 06:58:35 PDT 2012
Author: jng
Date: 2012-10-01 06:58:32 -0700 (Mon, 01 Oct 2012)
New Revision: 7059
Modified:
branches/maestro-4.0.x/
branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
Log:
#2115: Prevent group drops to directly underneath the original source (source == target, in such cases)
Property changes on: branches/maestro-4.0.x
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/Tools/Maestro:6490-6494,6923-6924,6926,6928,7026,7034,7056
+ /trunk/Tools/Maestro:6490-6494,6923-6924,6926,6928,7026,7034,7056,7058
Modified: branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
===================================================================
--- branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs 2012-10-01 13:54:36 UTC (rev 7058)
+++ branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs 2012-10-01 13:58:32 UTC (rev 7059)
@@ -1044,7 +1044,7 @@
var li = node.Tag as LayerItem;
if (gi != null)
{
- if (TargetIsDescendant(nodes, gi))
+ if (TargetIsAmongSource(nodes, gi) || TargetIsDescendant(nodes, gi))
return;
parent = gi.Tag;
@@ -1087,6 +1087,17 @@
}
}
+ private static bool TargetIsAmongSource(TreeNodeAdv[] nodes, GroupItem target)
+ {
+ foreach (var n in nodes)
+ {
+ var gi = n.Tag as GroupItem;
+ if (gi != null && gi == target)
+ return true;
+ }
+ return false;
+ }
+
private bool TargetIsDescendant(TreeNodeAdv[] nodes, GroupItem target)
{
foreach (var n in nodes)
More information about the mapguide-commits
mailing list