Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix test and clear layer when setting export themes
  • Loading branch information
elpaso authored and github-actions[bot] committed Jun 9, 2021
1 parent fad88ef commit 5410095
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/core/layout/qgslayoutitemmap.cpp
Expand Up @@ -347,6 +347,10 @@ void QgsLayoutItemMap::setFollowVisibilityPreset( bool follow )
return;

mFollowVisibilityPreset = follow;
if ( follow )
{
mLayers.clear();
}
if ( !mFollowVisibilityPresetName.isEmpty() )
emit themeChanged( mFollowVisibilityPreset ? mFollowVisibilityPresetName : QString() );
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgslayoutmap.cpp
Expand Up @@ -1401,7 +1401,7 @@ void TestQgsLayoutMap::testLayeredExport()

l.renderContext().setExportThemes( QStringList() << QStringLiteral( "test preset2" ) << QStringLiteral( "test preset" ) << QStringLiteral( "test preset3" ) );


map->setLayers( {} );
map->startLayeredExport();
QVERIFY( map->nextExportPart() );
map->createStagedRenderJob( map->extent(), QSize( 512, 512 ), 72 );
Expand Down

0 comments on commit 5410095

Please sign in to comment.