[mapguide-commits] r4459 -
trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Dec 21 16:28:00 EST 2009
Author: ksgeograf
Date: 2009-12-21 16:28:00 -0500 (Mon, 21 Dec 2009)
New Revision: 4459
Modified:
trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/SchemaSelector.cs
Log:
Maestro:
Fixed issue #1215.
Modified: trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/SchemaSelector.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/SchemaSelector.cs 2009-12-21 21:20:24 UTC (rev 4458)
+++ trunk/Tools/Maestro/Maestro/ResourceEditors/LayerEditorControls/SchemaSelector.cs 2009-12-21 21:28:00 UTC (rev 4459)
@@ -98,7 +98,7 @@
(m_layer.Item as OSGeo.MapGuide.MaestroAPI.GridLayerDefinitionType).FeatureName = schemaName;
if (SchemaChanged != null && Schema.SelectedIndex >= 0)
- SchemaChanged(false, m_schemas[Schema.SelectedIndex]);
+ SchemaChanged(false, this.SelectedSchema);
}
@@ -194,7 +194,7 @@
(m_layer.Item as OSGeo.MapGuide.MaestroAPI.GridLayerDefinitionType).FeatureName = Schema.Text;
if (SchemaChanged != null)
- SchemaChanged(true, m_schemas[Schema.SelectedIndex]);
+ SchemaChanged(true, this.SelectedSchema);
UpdateGeometry(true);
m_editor.HasChanged();
@@ -203,10 +203,24 @@
{
Geometry.Enabled = false;
}
+ }
+ [Browsable(false)]
+ public MaestroAPI.FeatureSourceDescription.FeatureSourceSchema SelectedSchema
+ {
+ get
+ {
+ if (Schema.SelectedIndex < 0)
+ return null;
- }
+ foreach (MaestroAPI.FeatureSourceDescription.FeatureSourceSchema s in m_schemas.Schemas)
+ if (OSGeo.MapGuide.MaestroAPI.Utility.DecodeFDOName(s.Fullname) == Schema.Text)
+ return s;
+ return null;
+ }
+ }
+
public bool IsRaster
{
get { return m_isRaster; }
@@ -232,7 +246,7 @@
Geometry.Enabled = true;
- foreach(OSGeo.MapGuide.MaestroAPI.FeatureSetColumn col in m_schemas[Schema.SelectedIndex].Columns)
+ foreach(OSGeo.MapGuide.MaestroAPI.FeatureSetColumn col in SelectedSchema.Columns)
{
if (!m_isRaster && col.Type == OSGeo.MapGuide.MaestroAPI.Utility.GeometryType)
Geometry.Items.Add(col.Name);
More information about the mapguide-commits
mailing list