Skip to content
Permalink
Browse files

Fix wmsserver: Do not manipulate maplayerregistry directly

  • Loading branch information
m-kuhn committed May 17, 2013
1 parent 55556fc commit df19fe5e04b0c2ae8f1b13000099715559e6bd50
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/mapserver/qgswmsserver.cpp
@@ -373,7 +373,7 @@ QImage* QgsWMSServer::getLegendGraphics()
currentY += layerSpace;
}

QgsMapLayerRegistry::instance()->mapLayers().clear();
QgsMapLayerRegistry::instance()->removeAllMapLayers();
delete theImage;
return paintImage;
}
@@ -649,7 +649,7 @@ QImage* QgsWMSServer::getMap()
clearFeatureSelections( selectedLayerIdList );

QgsDebugMsg( "clearing filters" );
QgsMapLayerRegistry::instance()->mapLayers().clear();
QgsMapLayerRegistry::instance()->removeAllMapLayers();

#ifdef QGISDEBUG
theImage->save( QDir::tempPath() + QDir::separator() + "lastrender.png" );
@@ -1926,7 +1926,7 @@ QStringList QgsWMSServer::applyFeatureSelections( const QStringList& layerList )

void QgsWMSServer::clearFeatureSelections( const QStringList& layerIds ) const
{
QMap<QString, QgsMapLayer*>& layerMap = QgsMapLayerRegistry::instance()->mapLayers();
const QMap<QString, QgsMapLayer*>& layerMap = QgsMapLayerRegistry::instance()->mapLayers();

foreach ( QString id, layerIds )
{

0 comments on commit df19fe5

Please sign in to comment.
You can’t perform that action at this time.