[mapguide-commits] r8895 - sandbox/adsk/3.1n/Server/src/Services/Rendering
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Mar 31 00:17:56 PDT 2016
Author: hubu
Date: 2016-03-31 00:17:56 -0700 (Thu, 31 Mar 2016)
New Revision: 8895
Modified:
sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp
Log:
Fix a bug introduced by RFC #151.
When we get a layer's watermark, we use layerWatermarks->OrphanAt(index). This modifies the watermark collection of the layer. So we cannot use layer definition cache for watermarks.
Modified: sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp 2016-03-30 08:46:13 UTC (rev 8894)
+++ sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp 2016-03-31 07:17:56 UTC (rev 8895)
@@ -2043,11 +2043,9 @@
continue;
Ptr<MgResourceIdentifier> layerid = mapLayer->GetLayerDefinition();
- MgCacheManager* cacheManager = MgCacheManager::GetInstance();
- Ptr<MgResourceLayerDefinitionCacheItem> cacheItem = cacheManager->GetResourceLayerDefinitionCacheItem(layerid);
- MdfModel::LayerDefinition* layerDefinition = cacheItem->Get();
+ ldf.reset(MgLayerBase::GetLayerDefinition(m_svcResource, layerid));
+ WatermarkInstanceCollection* layerWatermarks = ldf->GetWatermarks();
- WatermarkInstanceCollection* layerWatermarks = layerDefinition->GetWatermarks();
for (int j=layerWatermarks->GetCount()-1; j>=0; j--)
tempWatermarkInstances.Adopt(layerWatermarks->OrphanAt(j));
for (int j=tempWatermarkInstances.GetCount()-1; j>=0; j--)
More information about the mapguide-commits
mailing list