[mapguide-commits] r6300 - trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Dec 6 09:42:34 EST 2011


Author: jng
Date: 2011-12-06 06:42:34 -0800 (Tue, 06 Dec 2011)
New Revision: 6300

Modified:
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/LineFeatureStyleEditor.cs
Log:
#1880: Fix exception when editing a line style with no line symbolization

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/LineFeatureStyleEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/LineFeatureStyleEditor.cs	2011-12-06 14:30:49 UTC (rev 6299)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/LineFeatureStyleEditor.cs	2011-12-06 14:42:34 UTC (rev 6300)
@@ -128,11 +128,14 @@
 
                 if (!compositeLines.Checked)
                 {
-                    var st2 = m_item[0] as IStroke2;
-                    if (st2 != null)
-                        sizeContextCombo.SelectedValue = st2.SizeContext;
-                    else
-                        sizeContextCombo.Enabled = false; //Must be a 1.0.0 schema line rule
+                    if (m_item.Count > 0)
+                    {
+                        var st2 = m_item[0] as IStroke2;
+                        if (st2 != null)
+                            sizeContextCombo.SelectedValue = st2.SizeContext;
+                        else
+                            sizeContextCombo.Enabled = false; //Must be a 1.0.0 schema line rule
+                    }
                 }
 
 				UpdateDisplayForSelected();



More information about the mapguide-commits mailing list