[mapguide-commits] r4477 - trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Jan 4 14:54:58 EST 2010


Author: ksgeograf
Date: 2010-01-04 14:54:58 -0500 (Mon, 04 Jan 2010)
New Revision: 4477

Modified:
   trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/AreaFeatureStyleEditor.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/FontStyleEditor.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/LineFeatureStyleEditor.cs
   trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/PointFeatureStyleEditor.cs
Log:
Maestro:
Fixed issue #1205.

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/AreaFeatureStyleEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/AreaFeatureStyleEditor.cs	2010-01-04 18:40:18 UTC (rev 4476)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/AreaFeatureStyleEditor.cs	2010-01-04 19:54:58 UTC (rev 4477)
@@ -486,6 +486,10 @@
                     m_inUpdate = true;
                 owner.SelectedIndex = -1;
 
+                //HACK: Odd bug, don't remove
+                if (owner.SelectedIndex != -1)
+                    owner.SelectedIndex = -1;
+
                 owner.Text = text;
             }
             finally

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/FontStyleEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/FontStyleEditor.cs	2010-01-04 18:40:18 UTC (rev 4476)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/FontStyleEditor.cs	2010-01-04 19:54:58 UTC (rev 4477)
@@ -167,10 +167,27 @@
 				textColor.CurrentColor = m_item.ForegroundColor;
 				backgroundColor.CurrentColor = m_item.BackgroundColor;
 				backgroundTypeCombo.SelectedValue = m_item.BackgroundStyle.ToString();
-				if (m_item.HorizontalAlignment != null)
-					horizontalCombo.SelectedValue = m_item.HorizontalAlignment;
-				if (m_item.VerticalAlignment != null)
-					verticalCombo.SelectedValue = m_item.VerticalAlignment;
+                rotationCombo.SelectedIndex = -1;
+                rotationCombo.Text = m_item.Rotation;
+                if (m_item.HorizontalAlignment != null)
+                {
+                    horizontalCombo.SelectedValue = m_item.HorizontalAlignment;
+                    if (horizontalCombo.SelectedValue == null)
+                    {
+                        horizontalCombo.SelectedIndex = -1;
+                        horizontalCombo.Text = m_item.HorizontalAlignment;
+                    }
+                }
+
+                if (m_item.VerticalAlignment != null)
+                {
+                    verticalCombo.SelectedValue = m_item.VerticalAlignment;
+                    if (verticalCombo.SelectedValue == null)
+                    {
+                        verticalCombo.SelectedIndex = -1;
+                        verticalCombo.Text = m_item.VerticalAlignment;
+                    }
+                }
 			}
 			finally
 			{
@@ -965,6 +982,10 @@
                     m_inUpdate = true;
                 owner.SelectedIndex = -1;
 
+                //HACK: Odd bug, don't remove
+                if (owner.SelectedIndex != -1)
+                    owner.SelectedIndex = -1;
+
                 owner.Text = text;
             }
             finally
@@ -979,7 +1000,7 @@
             if (m_inUpdate || horizontalCombo.SelectedIndex != -1)
                 return;
 
-            m_item.HorizontalAlignment = (string)horizontalCombo.SelectedValue;
+            m_item.HorizontalAlignment = (string)horizontalCombo.Text;
             previewPicture.Refresh();
 
             if (Changed != null)
@@ -991,7 +1012,7 @@
             if (m_inUpdate || verticalCombo.SelectedIndex != -1)
                 return;
 
-            m_item.VerticalAlignment = (string)verticalCombo.SelectedValue;
+            m_item.VerticalAlignment = (string)verticalCombo.Text;
             previewPicture.Refresh();
 
             if (Changed != null)
@@ -1004,7 +1025,7 @@
                 return;
 
             //TODO: Validate
-            m_item.Rotation = sizeCombo.Text;
+            m_item.Rotation = rotationCombo.Text;
             previewPicture.Refresh();
 
             if (Changed != null)

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/LineFeatureStyleEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/LineFeatureStyleEditor.cs	2010-01-04 18:40:18 UTC (rev 4476)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/LineFeatureStyleEditor.cs	2010-01-04 19:54:58 UTC (rev 4477)
@@ -641,6 +641,10 @@
                     m_inUpdate = true;
                 owner.SelectedIndex = -1;
 
+                //HACK: Odd bug, don't remove
+                if (owner.SelectedIndex != -1)
+                    owner.SelectedIndex = -1;
+
                 owner.Text = text;
             }
             finally

Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/PointFeatureStyleEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/PointFeatureStyleEditor.cs	2010-01-04 18:40:18 UTC (rev 4476)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/GeometryStyleEditors/PointFeatureStyleEditor.cs	2010-01-04 19:54:58 UTC (rev 4477)
@@ -176,6 +176,7 @@
 				// shared values
 				WidthText.Text = m_item.Item.SizeX;
 				HeigthText.Text = m_item.Item.SizeY;
+                RotationBox.SelectedIndex = -1;
 				RotationBox.Text = m_item.Item.Rotation;
 
 				SizeUnits.SelectedValue = m_item.Item.Unit;
@@ -885,6 +886,10 @@
                 if (!userChange)
                     m_inUpdate = true;
                 owner.SelectedIndex = -1;
+                
+                //HACK: Odd bug, don't remove
+                if (owner.SelectedIndex != -1)
+                    owner.SelectedIndex = -1;
 
                 owner.Text = text;
             }
@@ -1289,9 +1294,9 @@
 
             //TODO: Validate
             if (m_item.Item.GetType() == typeof(OSGeo.MapGuide.MaestroAPI.MarkSymbolType))
-                ((OSGeo.MapGuide.MaestroAPI.MarkSymbolType)m_item.Item).Rotation = (string)RotationBox.Text;
+                ((OSGeo.MapGuide.MaestroAPI.MarkSymbolType)m_item.Item).Rotation = RotationBox.Text;
             else if (m_item.Item.GetType() == typeof(OSGeo.MapGuide.MaestroAPI.FontSymbolType))
-                ((OSGeo.MapGuide.MaestroAPI.FontSymbolType)m_item.Item).Rotation = (string)RotationBox.Text;
+                ((OSGeo.MapGuide.MaestroAPI.FontSymbolType)m_item.Item).Rotation = RotationBox.Text;
             previewPicture.Refresh();
             if (Changed != null)
                 Changed(this, new EventArgs());



More information about the mapguide-commits mailing list