Skip to content
Permalink
Browse files

Fix for ticket #4283 (composer forgets on/off status of layers)

  • Loading branch information
mhugent committed Sep 19, 2011
1 parent 810ee5e commit 23dd29f6951fc0cdea88ae4b45dca8e4fe43eeb9
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/core/composer/qgscomposermap.cpp
@@ -822,7 +822,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 ) ) )

0 comments on commit 23dd29f

Please sign in to comment.
You can’t perform that action at this time.