Skip to content
Permalink
Browse files
Fix test and clear layer when setting export themes
  • Loading branch information
elpaso authored and github-actions committed Jun 9, 2021
1 parent fad88ef commit 5410095943b802a21fbb7e4d79556b48445a7c7e
Showing with 5 additions and 1 deletion.
  1. +4 −0 src/core/layout/qgslayoutitemmap.cpp
  2. +1 −1 tests/src/core/testqgslayoutmap.cpp
@@ -347,6 +347,10 @@ void QgsLayoutItemMap::setFollowVisibilityPreset( bool follow )
return;

mFollowVisibilityPreset = follow;
if ( follow )
{
mLayers.clear();
}
if ( !mFollowVisibilityPresetName.isEmpty() )
emit themeChanged( mFollowVisibilityPreset ? mFollowVisibilityPresetName : QString() );
}
@@ -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 );

0 comments on commit 5410095

Please sign in to comment.