We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 810ee5e commit 23dd29fCopy full SHA for 23dd29f
src/core/composer/qgscomposermap.cpp
@@ -822,7 +822,17 @@ void QgsComposerMap::syncLayerSet()
822
return;
823
}
824
825
- QStringList currentLayerSet = mMapRenderer->layerSet();
+ //if layer set is fixed, do a lookup in the layer registry to also find the non-visible layers
826
+ QStringList currentLayerSet;
827
+ if ( mKeepLayerSet )
828
+ {
829
+ currentLayerSet = QgsMapLayerRegistry::instance()->mapLayers().uniqueKeys();
830
+ }
831
+ else //only consider layers visible in the map
832
833
+ currentLayerSet = mMapRenderer->layerSet();
834
835
+
836
for ( int i = mLayerSet.size() - 1; i >= 0; --i )
837
{
838
if ( !currentLayerSet.contains( mLayerSet.at( i ) ) )
0 commit comments