[mapguide-commits] r8571 - trunk/MgDev/Common/MapGuideCommon/Controller
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Mar 11 09:01:18 PDT 2015
Author: jng
Date: 2015-03-11 09:01:17 -0700 (Wed, 11 Mar 2015)
New Revision: 8571
Modified:
trunk/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
Log:
#2526: Fix MgUnclassifiedException when doing a QUERYMAPFEATURES with PERSIST=0
Reviewed by Walt Welton-Lair
Modified: trunk/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp 2015-03-11 14:12:16 UTC (rev 8570)
+++ trunk/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp 2015-03-11 16:01:17 UTC (rev 8571)
@@ -278,17 +278,26 @@
// Call the C++ API, regardless of bitmask as any part of the mask will require information from this API
featureInfo = service->QueryFeatures(map, layerNames, selectionGeometry, selectionVariant, featureFilter, maxFeatures, layerAttributeFilter);
+ Ptr<MgSelection> selection;
+ if (NULL != featureInfo.p)
+ selection = featureInfo->GetSelection();
+
+ bool bSetMap = true;
+ if (!selection)
+ {
+ selection = new MgSelection(map);
+ bSetMap = false;
+ }
+
if (persist)
{
//save the selection set in the session repository
- Ptr<MgSelection> selection;
- if (NULL != featureInfo.p)
- selection = featureInfo->GetSelection();
- if(!selection)
- selection = new MgSelection(map);
selection->Save(resourceService, mapName);
- newSelection = SAFE_ADDREF(selection.p);
+ }
+ newSelection = SAFE_ADDREF(selection.p);
+ if (bSetMap)
+ {
//Needed for GetLayers() to work below
newSelection->SetMap(map);
}
More information about the mapguide-commits
mailing list