[mapguide-commits] r5275 - in sandbox/maestro-3.0/Maestro.Editors:
FeatureSource FeatureSource/Extensions LayerDefinition/Vector/Scales
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Oct 12 08:31:54 EDT 2010
Author: jng
Date: 2010-10-12 05:31:54 -0700 (Tue, 12 Oct 2010)
New Revision: 5275
Modified:
sandbox/maestro-3.0/Maestro.Editors/FeatureSource/CoordSysOverrideCtrl.cs
sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Extensions/ExtendedClassSettings.cs
sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs
sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs
sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRange.cs
sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.cs
sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeList.cs
Log:
3.0 sandbox changes:
- Fix some broken functionality in the Feature Source and Layer Definition editors as a result of moving to interfaces
- Add missing dirty state notifications in Feature Source Extension editor
Modified: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/CoordSysOverrideCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/CoordSysOverrideCtrl.cs 2010-10-12 09:59:15 UTC (rev 5274)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/CoordSysOverrideCtrl.cs 2010-10-12 12:31:54 UTC (rev 5275)
@@ -50,15 +50,21 @@
_fs = (IFeatureSource)_ed.GetEditedResource();
grdOverrides.AutoGenerateColumns = false;
- grdOverrides.DataSource = _fs.SupplementalSpatialContextInfo;
+ UpdateSpatialContextList();
}
+ private void UpdateSpatialContextList()
+ {
+ grdOverrides.DataSource = new List<ISpatialContextInfo>(_fs.SupplementalSpatialContextInfo);
+ }
+
private void btnAdd_Click(object sender, EventArgs e)
{
var dlg = new CoordSysOverrideDialog(_ed);
if (dlg.ShowDialog() == DialogResult.OK)
{
_fs.AddSpatialContextOverride(dlg.CsName, dlg.CoordinateSystemWkt);
+ UpdateSpatialContextList();
OnResourceChanged();
}
}
@@ -83,6 +89,7 @@
var sc = (ISpatialContextInfo)grdOverrides.SelectedRows[0].DataBoundItem;
_fs.RemoveSpatialContextOverride(sc);
+ UpdateSpatialContextList();
OnResourceChanged();
}
@@ -100,6 +107,7 @@
{
sc.Name = dlg.CsName;
sc.CoordinateSystem = dlg.CoordinateSystemWkt;
+ UpdateSpatialContextList();
OnResourceChanged();
}
}
Modified: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Extensions/ExtendedClassSettings.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Extensions/ExtendedClassSettings.cs 2010-10-12 09:59:15 UTC (rev 5274)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Extensions/ExtendedClassSettings.cs 2010-10-12 12:31:54 UTC (rev 5275)
@@ -40,8 +40,8 @@
public ExtendedClassSettings(ClassDefinition[] classes, IFeatureSourceExtension ext)
: this()
{
- cmbBaseClass.DisplayMember = "Fullname";
- cmbBaseClass.ValueMember = "Fullname";
+ cmbBaseClass.DisplayMember = "QualifiedNameDecoded";
+ cmbBaseClass.ValueMember = "QualifiedNameDecoded";
cmbBaseClass.DataSource = classes;
//txtExtendedName.DataBindings.Add("Text", ext, "Name");
Modified: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs 2010-10-12 09:59:15 UTC (rev 5274)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/ExtensionsCtrl.cs 2010-10-12 12:31:54 UTC (rev 5275)
@@ -52,6 +52,7 @@
public override void Bind(IEditorService service)
{
+ service.RegisterCustomNotifier(this);
_edSvc = service;
_edSvc.Saved += OnResourceSaved;
_fs = (IFeatureSource)_edSvc.GetEditedResource();
@@ -183,6 +184,7 @@
};
_fs.AddExtension(ext);
+ OnResourceChanged();
trvExtensions.Nodes.Add(node);
trvExtensions.SelectedNode = node;
@@ -222,6 +224,7 @@
node.Expand();
ext.AddCalculatedProperty(calc);
+ OnResourceChanged();
trvExtensions.SelectedNode = cNode;
}
@@ -258,6 +261,7 @@
node.Expand();
ext.AddRelation(join);
+ OnResourceChanged();
trvExtensions.SelectedNode = jNode;
}
@@ -275,6 +279,7 @@
if (ext != null)
{
_fs.RemoveExtension(ext);
+ OnResourceChanged();
}
else if (join != null)
{
@@ -283,6 +288,7 @@
if (ext != null)
{
ext.RemoveRelation(join);
+ OnResourceChanged();
node.Parent.Nodes.Remove(node);
}
}
@@ -293,6 +299,7 @@
if (ext != null)
{
ext.RemoveCalculatedProperty(calc);
+ OnResourceChanged();
node.Parent.Nodes.Remove(node);
}
}
Modified: sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs 2010-10-12 09:59:15 UTC (rev 5274)
+++ sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ConditionListButtons.cs 2010-10-12 12:31:54 UTC (rev 5275)
@@ -64,9 +64,10 @@
conditionList.SelectionChanged += new EventHandler(conditionList_SelectionChanged);
}
- public ConditionListButtons(ILayerElementFactory factory) : this()
+ internal ILayerElementFactory Factory
{
- _factory = factory;
+ get { return _factory; }
+ set { _factory = value; }
}
private void conditionList_SelectionChanged(object sender, EventArgs e)
Modified: sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRange.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRange.cs 2010-10-12 09:59:15 UTC (rev 5274)
+++ sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRange.cs 2010-10-12 12:31:54 UTC (rev 5275)
@@ -51,7 +51,18 @@
}
}
+ private ILayerElementFactory _factory;
+ internal ILayerElementFactory Factory
+ {
+ get { return _factory; }
+ set
+ {
+ _factory = value;
+ scaleRangeConditions.Factory = value;
+ }
+ }
+
public ScaleRange()
{
InitializeComponent();
Modified: sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.cs 2010-10-12 09:59:15 UTC (rev 5274)
+++ sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeConditions.cs 2010-10-12 12:31:54 UTC (rev 5275)
@@ -61,10 +61,16 @@
private ILayerElementFactory _factory;
- public ScaleRangeConditions(ILayerElementFactory factory)
- : this()
+ internal ILayerElementFactory Factory
{
- _factory = factory;
+ get { return _factory; }
+ set
+ {
+ _factory = value;
+ lineConditionList.Factory = value;
+ pointConditionList.Factory = value;
+ areaConditionList.Factory = value;
+ }
}
public void SetItem(IVectorScaleRange vsc)
@@ -87,19 +93,19 @@
hasPoints = true;
pointConditionList.SetItem(m_vsc, ps);
}
- else if (ls != null)
+ if (ls != null)
{
hasLines = true;
lineConditionList.SetItem(m_vsc, ls);
}
- else if (ars != null)
+ if (ars != null)
{
hasAreas = true;
areaConditionList.SetItem(m_vsc, ars);
}
- else
- m_hasUnsupportedItems = true;
+ m_hasUnsupportedItems = !hasPoints && !hasLines && !hasAreas;
+
DisplayPoints.Checked = hasPoints;
DisplayLines.Checked = hasLines;
DisplayAreas.Checked = hasAreas;
Modified: sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeList.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeList.cs 2010-10-12 09:59:15 UTC (rev 5274)
+++ sandbox/maestro-3.0/Maestro.Editors/LayerDefinition/Vector/Scales/ScaleRangeList.cs 2010-10-12 12:31:54 UTC (rev 5275)
@@ -93,6 +93,7 @@
public ScaleRange AddScaleRange(IVectorScaleRange sc)
{
ScaleRange sr = new ScaleRange();
+ sr.Factory = (ILayerElementFactory)m_owner.Editor.GetEditedResource();
sr.Owner = m_owner;
sr.SetItem(sc);
sr.Dock = DockStyle.Top;
More information about the mapguide-commits
mailing list