We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 8905274 commit 820469fCopy full SHA for 820469f
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