Skip to content
Permalink
Browse files
Fix tests: clear layers before theme export
  • Loading branch information
elpaso authored and github-actions committed Jun 9, 2021
1 parent 5410095 commit d10331eeb641523da50d1a25a2b8f5d5bb6e5e6b
Showing with 5 additions and 4 deletions.
  1. +1 −4 src/core/layout/qgslayoutitemmap.cpp
  2. +4 −0 tests/src/core/testqgslayoutgeopdfexport.cpp
@@ -347,10 +347,7 @@ void QgsLayoutItemMap::setFollowVisibilityPreset( bool follow )
return;

mFollowVisibilityPreset = follow;
if ( follow )
{
mLayers.clear();
}

if ( !mFollowVisibilityPresetName.isEmpty() )
emit themeChanged( mFollowVisibilityPreset ? mFollowVisibilityPresetName : QString() );
}
@@ -256,6 +256,10 @@ void TestQgsLayoutGeoPdfExport::testCollectingFeatures()
map2->setFollowVisibilityPreset( true );
map2->setFollowVisibilityPresetName( QStringLiteral( "test preset3" ) );

// Clear layers
map->setLayers( {} );
map2->setLayers( {} );

QgsLayoutGeoPdfExporter geoPdfExporter2( &l );
settings = QgsLayoutExporter::PdfExportSettings();
settings.writeGeoPdf = true;

0 comments on commit d10331e

Please sign in to comment.