We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8a9da0f + 820469f commit 5ad518dCopy full SHA for 5ad518d
src/core/composer/qgscomposermap.cpp
@@ -839,7 +839,17 @@ void QgsComposerMap::syncLayerSet()
839
return;
840
}
841
842
- QStringList currentLayerSet = mMapRenderer->layerSet();
+ //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
+
853
for ( int i = mLayerSet.size() - 1; i >= 0; --i )
854
{
855
if ( !currentLayerSet.contains( mLayerSet.at( i ) ) )
0 commit comments