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 8905274 commit 820469f4b1f179348e9a46b27b0c55bcfd466576
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/core/composer/qgscomposermap.cpp
@@ -839,7 +839,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 820469f

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