Skip to content

Commit

Permalink
Fix test -- we should not be enabling blend modes when forcing vector…
Browse files Browse the repository at this point in the history
… outputs of layouts
  • Loading branch information
nyalldawson committed Oct 6, 2023
1 parent 2c9b83e commit 98f3b57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/layout/qgslayoutitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ QgsLayoutItem::QgsLayoutItem( QgsLayout *layout, bool manageZValue )
mEffect = new QgsLayoutEffect();
if ( mLayout )
{
mEffect->setEnabled( mLayout->renderContext().flags() & QgsLayoutRenderContext::FlagUseAdvancedEffects );
mEffect->setEnabled( ( mLayout->renderContext().flags() & QgsLayoutRenderContext::FlagUseAdvancedEffects )
&& !( mLayout->renderContext().flags() & QgsLayoutRenderContext::FlagForceVectorOutput ) );
connect( &mLayout->renderContext(), &QgsLayoutRenderContext::flagsChanged, this, [ = ]( QgsLayoutRenderContext::Flags flags )
{
mEffect->setEnabled( flags & QgsLayoutRenderContext::FlagUseAdvancedEffects );
mEffect->setEnabled( ( flags & QgsLayoutRenderContext::FlagUseAdvancedEffects ) && !( flags & QgsLayoutRenderContext::FlagForceVectorOutput ) );
} );
}
setGraphicsEffect( mEffect.data() );
Expand Down

0 comments on commit 98f3b57

Please sign in to comment.