[mapguide-commits] r7285 - in trunk/Tools/Maestro/Maestro.Base: . Editor
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Dec 24 01:26:23 PST 2012
Author: jng
Date: 2012-12-24 01:26:22 -0800 (Mon, 24 Dec 2012)
New Revision: 7285
Modified:
trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs
trunk/Tools/Maestro/Maestro.Base/Strings.Designer.cs
trunk/Tools/Maestro/Maestro.Base/Strings.resx
Log:
#2003: Throw exception when bounds cannot be calculated for previewing. There is no graceful recovery option in this situation
Modified: trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs 2012-12-24 08:58:29 UTC (rev 7284)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/ResourcePreviewEngine.cs 2012-12-24 09:26:22 UTC (rev 7285)
@@ -115,6 +115,8 @@
var mdfId = "Session:" + sessionId + "//" + Guid.NewGuid() + ".MapDefinition"; //NOXLATE
string csWkt;
var extent = ldf.GetSpatialExtent(true, out csWkt);
+ if (extent == null)
+ throw new ApplicationException(Strings.FailedToCalculateFeatureSourceExtents);
//TODO: Based on the visible scales in this layer, size this extents accordingly
var mdf = ObjectFactory.CreateMapDefinition(conn, Strings.PreviewMap, csWkt, extent);
Modified: trunk/Tools/Maestro/Maestro.Base/Strings.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Strings.Designer.cs 2012-12-24 08:58:29 UTC (rev 7284)
+++ trunk/Tools/Maestro/Maestro.Base/Strings.Designer.cs 2012-12-24 09:26:22 UTC (rev 7285)
@@ -587,6 +587,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 Validation detected errors in your resource, please fix them before saving this resource.
/// </summary>
internal static string FixErrorsBeforeSaving {
Modified: trunk/Tools/Maestro/Maestro.Base/Strings.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Strings.resx 2012-12-24 08:58:29 UTC (rev 7284)
+++ trunk/Tools/Maestro/Maestro.Base/Strings.resx 2012-12-24 09:26:22 UTC (rev 7285)
@@ -989,4 +989,7 @@
<data name="ConfirmDeleteFolders" xml:space="preserve">
<value>You about to delete one or more folders which may contain dependent resources. Are you sure you want to proceed with delete?</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