Skip to content

Commit

Permalink
Fix wmsserver: Do not manipulate maplayerregistry directly
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 17, 2013
1 parent 55556fc commit df19fe5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mapserver/qgswmsserver.cpp
Expand Up @@ -373,7 +373,7 @@ QImage* QgsWMSServer::getLegendGraphics()
currentY += layerSpace;
}

QgsMapLayerRegistry::instance()->mapLayers().clear();
QgsMapLayerRegistry::instance()->removeAllMapLayers();
delete theImage;
return paintImage;
}
Expand Down Expand Up @@ -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" );
Expand Down Expand Up @@ -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 )
{
Expand Down

0 comments on commit df19fe5

Please sign in to comment.