[mapguide-commits] r7404 - trunk/MgDev/Desktop/MgDesktop/Services/Rendering
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Mar 20 09:14:30 PDT 2013
Author: jng
Date: 2013-03-20 09:14:30 -0700 (Wed, 20 Mar 2013)
New Revision: 7404
Modified:
trunk/MgDev/Desktop/MgDesktop/Services/Rendering/MappingUtil.cpp
Log:
mg-desktop changes: Port over r7281 (#1901)
Modified: trunk/MgDev/Desktop/MgDesktop/Services/Rendering/MappingUtil.cpp
===================================================================
--- trunk/MgDev/Desktop/MgDesktop/Services/Rendering/MappingUtil.cpp 2013-03-20 16:09:47 UTC (rev 7403)
+++ trunk/MgDev/Desktop/MgDesktop/Services/Rendering/MappingUtil.cpp 2013-03-20 16:14:30 UTC (rev 7404)
@@ -451,14 +451,28 @@
if (vl) //############################################################################ vector layer
{
+ // Tweaking this logic for #1981:
+ //
+ // We first try to find a valid scale range, only when we can't find a valid scale range do we
+ // coerce the first one to [0 - Infinity]
+
+ MdfModel::VectorScaleRangeCollection* scaleRanges = vl->GetScaleRanges();
+ MdfModel::VectorScaleRange* scaleRange = NULL;
+ if (scaleRanges)
+ {
+ // make sure we have a valid scale range
+ scaleRange = Stylizer::FindScaleRange(*scaleRanges, scale);
+ }
+
+ // We have a selection but no applicable scale range
+ //
// Modify the layer scale range to also support infinite
// Need to apply default style as one will not be defined
- if (selection)
+ if (selection && !scaleRange)
{
- MdfModel::VectorScaleRangeCollection* scaleRanges = vl->GetScaleRanges();
if (scaleRanges)
{
- MdfModel::VectorScaleRange* scaleRange = scaleRanges->GetAt(0);
+ scaleRange = scaleRanges->GetAt(0);
if (scaleRange)
{
scaleRange->SetMinScale(0.0);
@@ -467,9 +481,6 @@
}
}
- // make sure we have a valid scale range
- MdfModel::VectorScaleRange* scaleRange = Stylizer::FindScaleRange(*vl->GetScaleRanges(), scale);
-
if (scaleRange)
{
minScale_Profile = scaleRange->GetMinScale();
More information about the mapguide-commits
mailing list