Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
marco committed Sep 20, 2011
2 parents 8a9da0f + 820469f commit 5ad518d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/core/composer/qgscomposermap.cpp
Expand Up @@ -839,7 +839,17 @@ void QgsComposerMap::syncLayerSet()
return;
}

QStringList currentLayerSet = mMapRenderer->layerSet();
//if layer set is fixed, do a lookup in the layer registry to also find the non-visible layers
QStringList currentLayerSet;
if ( mKeepLayerSet )
{
currentLayerSet = QgsMapLayerRegistry::instance()->mapLayers().uniqueKeys();
}
else //only consider layers visible in the map
{
currentLayerSet = mMapRenderer->layerSet();
}

for ( int i = mLayerSet.size() - 1; i >= 0; --i )
{
if ( !currentLayerSet.contains( mLayerSet.at( i ) ) )
Expand Down

0 comments on commit 5ad518d

Please sign in to comment.