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

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

Please sign in to comment.