[mapguide-commits] r7286 - in branches/maestro-4.0.x/Maestro.Base: Editor Properties
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Dec 24 01:32:34 PST 2012
Author: jng
Date: 2012-12-24 01:32:33 -0800 (Mon, 24 Dec 2012)
New Revision: 7286
Modified:
branches/maestro-4.0.x/Maestro.Base/Editor/ResourcePreviewEngine.cs
branches/maestro-4.0.x/Maestro.Base/Properties/Resources.Designer.cs
branches/maestro-4.0.x/Maestro.Base/Properties/Resources.resx
Log:
#2003: Throw exception when bounds cannot be calculated for previewing. There is no graceful recovery option in this situation
Modified: branches/maestro-4.0.x/Maestro.Base/Editor/ResourcePreviewEngine.cs
===================================================================
--- branches/maestro-4.0.x/Maestro.Base/Editor/ResourcePreviewEngine.cs 2012-12-24 09:26:22 UTC (rev 7285)
+++ branches/maestro-4.0.x/Maestro.Base/Editor/ResourcePreviewEngine.cs 2012-12-24 09:32:33 UTC (rev 7286)
@@ -72,6 +72,8 @@
var mdfId = "Session:" + sessionId + "//" + Guid.NewGuid() + ".MapDefinition";
string csWkt;
var extent = ldf.GetSpatialExtent(true, out csWkt);
+ if (extent == null)
+ throw new ApplicationException(Properties.Resources.FailedToCalculateFeatureSourceExtents);
//TODO: Based on the visible scales in this layer, size this extents accordingly
var mdf = ObjectFactory.CreateMapDefinition(conn, Properties.Resources.PreviewMap, csWkt, extent);
Modified: branches/maestro-4.0.x/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- branches/maestro-4.0.x/Maestro.Base/Properties/Resources.Designer.cs 2012-12-24 09:26:22 UTC (rev 7285)
+++ branches/maestro-4.0.x/Maestro.Base/Properties/Resources.Designer.cs 2012-12-24 09:32:33 UTC (rev 7286)
@@ -750,6 +750,15 @@
}
/// <summary>
+ /// Looks up a localized string similar to Could not calculate the extents of the Feature Source. Preview is not possible.
+ /// </summary>
+ internal static string FailedToCalculateFeatureSourceExtents {
+ get {
+ return ResourceManager.GetString("FailedToCalculateFeatureSourceExtents", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Autodesk DWF (*.dwf)|*.dwf.
/// </summary>
internal static string Filter_Dwf_Files {
Modified: branches/maestro-4.0.x/Maestro.Base/Properties/Resources.resx
===================================================================
--- branches/maestro-4.0.x/Maestro.Base/Properties/Resources.resx 2012-12-24 09:26:22 UTC (rev 7285)
+++ branches/maestro-4.0.x/Maestro.Base/Properties/Resources.resx 2012-12-24 09:32:33 UTC (rev 7286)
@@ -1106,4 +1106,7 @@
<data name="ErrorUnknownExecutable" xml:space="preserve">
<value>Unknown executable specified: {0}</value>
</data>
+ <data name="FailedToCalculateFeatureSourceExtents" xml:space="preserve">
+ <value>Could not calculate the extents of the Feature Source. Preview is not possible</value>
+ </data>
</root>
\ No newline at end of file
More information about the mapguide-commits
mailing list