[mapguide-commits] r7112 - trunk/MgDev/Desktop/MapViewer
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Oct 12 06:09:54 PDT 2012
Author: jng
Date: 2012-10-12 06:09:54 -0700 (Fri, 12 Oct 2012)
New Revision: 7112
Modified:
trunk/MgDev/Desktop/MapViewer/IPropertyPane.cs
trunk/MgDev/Desktop/MapViewer/MgMapViewerProvider.cs
Log:
mg-desktop: Merge r7110 to trunk
Modified: trunk/MgDev/Desktop/MapViewer/IPropertyPane.cs
===================================================================
--- trunk/MgDev/Desktop/MapViewer/IPropertyPane.cs 2012-10-12 11:26:26 UTC (rev 7111)
+++ trunk/MgDev/Desktop/MapViewer/IPropertyPane.cs 2012-10-12 13:09:54 UTC (rev 7112)
@@ -160,7 +160,7 @@
continue;
}
- NameValueCollection mappings = provider.GetPropertyMappings(layer);
+ NameValueCollection mappings = (provider != null) ? provider.GetPropertyMappings(layer) : null;
_features[layer.Name] = new List<MgFeature>();
var reader = selection.GetSelectedFeatures(layer, layer.GetFeatureClassName(), false);
Modified: trunk/MgDev/Desktop/MapViewer/MgMapViewerProvider.cs
===================================================================
--- trunk/MgDev/Desktop/MapViewer/MgMapViewerProvider.cs 2012-10-12 11:26:26 UTC (rev 7111)
+++ trunk/MgDev/Desktop/MapViewer/MgMapViewerProvider.cs 2012-10-12 13:09:54 UTC (rev 7112)
@@ -118,9 +118,11 @@
internal NameValueCollection GetPropertyMappings(MgLayerBase layer)
{
MgResourceIdentifier resId = layer.GetLayerDefinition();
- MgByteReader content = _resSvc.GetResourceContent(resId);
string resIdStr = resId.ToString();
+ if (_propertyMappings.ContainsKey(resIdStr))
+ return _propertyMappings[resIdStr];
+ MgByteReader content = _resSvc.GetResourceContent(resId);
XmlDocument doc = new XmlDocument();
string xml = content.ToString();
doc.LoadXml(xml);
@@ -135,6 +137,11 @@
}
_propertyMappings[resIdStr] = propertyMappings;
}
+ else
+ {
+ //NULL is a legit dictionary value
+ _propertyMappings[resIdStr] = null;
+ }
return _propertyMappings[resIdStr];
}
More information about the mapguide-commits
mailing list