Skip to content

Commit 5ad518d

Browse files
author
marco
committed
Merge branch 'master' of github.com:qgis/Quantum-GIS
2 parents 8a9da0f + 820469f commit 5ad518d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/core/composer/qgscomposermap.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,17 @@ void QgsComposerMap::syncLayerSet()
839839
return;
840840
}
841841

842-
QStringList currentLayerSet = mMapRenderer->layerSet();
842+
//if layer set is fixed, do a lookup in the layer registry to also find the non-visible layers
843+
QStringList currentLayerSet;
844+
if ( mKeepLayerSet )
845+
{
846+
currentLayerSet = QgsMapLayerRegistry::instance()->mapLayers().uniqueKeys();
847+
}
848+
else //only consider layers visible in the map
849+
{
850+
currentLayerSet = mMapRenderer->layerSet();
851+
}
852+
843853
for ( int i = mLayerSet.size() - 1; i >= 0; --i )
844854
{
845855
if ( !currentLayerSet.contains( mLayerSet.at( i ) ) )

0 commit comments

Comments
 (0)