[mapguide-commits] r7169 - in branches/maestro-4.0.x: . Maestro.Editors/MapDefinition

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Oct 29 09:30:16 PDT 2012


Author: jng
Date: 2012-10-29 09:30:16 -0700 (Mon, 29 Oct 2012)
New Revision: 7169

Modified:
   branches/maestro-4.0.x/
   branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.Designer.cs
   branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
Log:
#2139: Backport to 4.0.x


Property changes on: branches/maestro-4.0.x
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/Tools/Maestro:6490-6494,6923-6924,6926,6928,7026,7034,7056,7058,7060-7061,7073-7074,7125-7128,7164,7166
   + /trunk/Tools/Maestro:6490-6494,6923-6924,6926,6928,7026,7034,7056,7058,7060-7061,7073-7074,7125-7128,7164,7166,7168

Modified: branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.Designer.cs
===================================================================
--- branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.Designer.cs	2012-10-29 16:26:12 UTC (rev 7168)
+++ branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.Designer.cs	2012-10-29 16:30:16 UTC (rev 7169)
@@ -101,6 +101,7 @@
             resources.ApplyResources(this.tabControl1, "tabControl1");
             this.tabControl1.Name = "tabControl1";
             this.tabControl1.SelectedIndex = 0;
+            this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
             // 
             // TAB_GROUP
             // 
@@ -124,12 +125,12 @@
             this.trvLayersGroup.NodeControls.Add(this.NODE_GROUP_ICON);
             this.trvLayersGroup.NodeControls.Add(this.NODE_GROUP_TEXT);
             this.trvLayersGroup.SelectedNode = null;
-            this.trvLayersGroup.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trvLayersGroup_MouseDoubleClick);
+            this.trvLayersGroup.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.trvLayersGroup_ItemDrag);
+            this.trvLayersGroup.DragDrop += new System.Windows.Forms.DragEventHandler(this.trvLayersGroup_DragDrop);
+            this.trvLayersGroup.DragEnter += new System.Windows.Forms.DragEventHandler(this.trvLayersGroup_DragEnter);
             this.trvLayersGroup.DragOver += new System.Windows.Forms.DragEventHandler(this.trvLayersGroup_DragOver);
             this.trvLayersGroup.MouseClick += new System.Windows.Forms.MouseEventHandler(this.trvLayersGroup_MouseClick);
-            this.trvLayersGroup.DragDrop += new System.Windows.Forms.DragEventHandler(this.trvLayersGroup_DragDrop);
-            this.trvLayersGroup.DragEnter += new System.Windows.Forms.DragEventHandler(this.trvLayersGroup_DragEnter);
-            this.trvLayersGroup.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.trvLayersGroup_ItemDrag);
+            this.trvLayersGroup.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trvLayersGroup_MouseDoubleClick);
             // 
             // NODE_GROUP_ICON
             // 
@@ -254,12 +255,12 @@
             this.trvLayerDrawingOrder.NodeControls.Add(this.NODE_DRAW_ICON);
             this.trvLayerDrawingOrder.NodeControls.Add(this.NODE_DRAW_TEXT);
             this.trvLayerDrawingOrder.SelectedNode = null;
-            this.trvLayerDrawingOrder.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trvLayerDrawingOrder_MouseDoubleClick);
+            this.trvLayerDrawingOrder.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.trvLayerDrawingOrder_ItemDrag);
+            this.trvLayerDrawingOrder.DragDrop += new System.Windows.Forms.DragEventHandler(this.trvLayerDrawingOrder_DragDrop);
+            this.trvLayerDrawingOrder.DragEnter += new System.Windows.Forms.DragEventHandler(this.trvLayerDrawingOrder_DragEnter);
             this.trvLayerDrawingOrder.DragOver += new System.Windows.Forms.DragEventHandler(this.trvLayerDrawingOrder_DragOver);
             this.trvLayerDrawingOrder.MouseClick += new System.Windows.Forms.MouseEventHandler(this.trvLayerDrawingOrder_MouseClick);
-            this.trvLayerDrawingOrder.DragDrop += new System.Windows.Forms.DragEventHandler(this.trvLayerDrawingOrder_DragDrop);
-            this.trvLayerDrawingOrder.DragEnter += new System.Windows.Forms.DragEventHandler(this.trvLayerDrawingOrder_DragEnter);
-            this.trvLayerDrawingOrder.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.trvLayerDrawingOrder_ItemDrag);
+            this.trvLayerDrawingOrder.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trvLayerDrawingOrder_MouseDoubleClick);
             // 
             // NODE_DRAW_ICON
             // 
@@ -369,12 +370,12 @@
             this.trvBaseLayers.NodeControls.Add(this.nodeIcon1);
             this.trvBaseLayers.NodeControls.Add(this.nodeTextBox1);
             this.trvBaseLayers.SelectedNode = null;
-            this.trvBaseLayers.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trvBaseLayers_MouseDoubleClick);
+            this.trvBaseLayers.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.trvBaseLayers_ItemDrag);
+            this.trvBaseLayers.DragDrop += new System.Windows.Forms.DragEventHandler(this.trvBaseLayers_DragDrop);
+            this.trvBaseLayers.DragEnter += new System.Windows.Forms.DragEventHandler(this.trvBaseLayers_DragEnter);
             this.trvBaseLayers.DragOver += new System.Windows.Forms.DragEventHandler(this.trvBaseLayers_DragOver);
             this.trvBaseLayers.MouseClick += new System.Windows.Forms.MouseEventHandler(this.trvBaseLayers_MouseClick);
-            this.trvBaseLayers.DragDrop += new System.Windows.Forms.DragEventHandler(this.trvBaseLayers_DragDrop);
-            this.trvBaseLayers.DragEnter += new System.Windows.Forms.DragEventHandler(this.trvBaseLayers_DragEnter);
-            this.trvBaseLayers.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.trvBaseLayers_ItemDrag);
+            this.trvBaseLayers.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trvBaseLayers_MouseDoubleClick);
             // 
             // nodeIcon1
             // 

Modified: branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs
===================================================================
--- branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs	2012-10-29 16:26:12 UTC (rev 7168)
+++ branches/maestro-4.0.x/Maestro.Editors/MapDefinition/MapLayersSectionCtrl.cs	2012-10-29 16:30:16 UTC (rev 7169)
@@ -225,6 +225,7 @@
             var item = new GroupPropertiesCtrl(group.Tag);
             item.GroupChanged += (s, evt) => { OnResourceChanged(); };
             item.Dock = DockStyle.Fill;
+            _activeLayer = null;
             propertiesPanel.Controls.Add(item);
         }
 
@@ -236,6 +237,7 @@
             var item = new LayerPropertiesCtrl(layer.Tag, _edSvc.ResourceService);
             item.LayerChanged += (s, evt) => { OnResourceChanged(); };
             item.Dock = DockStyle.Fill;
+            _activeLayer = layer.Tag;
             propertiesPanel.Controls.Add(item);
         }
 
@@ -258,6 +260,8 @@
             }
         }
 
+        private IMapLayer _activeLayer;
+
         private void OnDrawOrderLayerItemSelected(LayerItem layer)
         {
             btnDLMoveLayerBottom.Enabled =
@@ -270,6 +274,7 @@
             var item = new LayerPropertiesCtrl(layer.Tag, _edSvc.ResourceService);
             item.LayerChanged += (s, evt) => { OnResourceChanged(); };
             item.Dock = DockStyle.Fill;
+            _activeLayer = layer.Tag;
             propertiesPanel.Controls.Add(item);
         }
 
@@ -917,6 +922,7 @@
             var item = new GroupPropertiesCtrl(group.Tag);
             item.GroupChanged += (s, evt) => { OnResourceChanged(); };
             item.Dock = DockStyle.Fill;
+            _activeLayer = null;
             propertiesPanel.Controls.Add(item);
         }
 
@@ -931,6 +937,7 @@
             var item = new LayerPropertiesCtrl(layer.Tag, _edSvc.ResourceService);
             item.LayerChanged += (s, evt) => { OnResourceChanged(); };
             item.Dock = DockStyle.Fill;
+            _activeLayer = null;
             propertiesPanel.Controls.Add(item);
         }
 
@@ -1444,5 +1451,24 @@
                               "--mapagent=" + conn.GetCustomProperty("BaseUrl"),
                               "--mapdefinitions=" + _edSvc.ResourceID);
         }
+
+        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (_activeLayer != null)
+            {
+                switch (tabControl1.SelectedIndex)
+                {
+                    case 0: //Logical
+                        RestoreLayerSelection(_activeLayer);
+                        break;
+                    case 1: //Draw Order
+                        RestoreDrawOrderSelection(_activeLayer);
+                        break;
+                    default:
+                        _activeLayer = null;
+                        break;
+                }
+            }
+        }
     }
 }



More information about the mapguide-commits mailing list