Skip to content

Commit

Permalink
Fix inconsistent use of layout render context flags
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson authored and rldhont committed May 20, 2019
1 parent bfe746d commit 8e57dad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/layout/qgslayoutexporter.cpp
Expand Up @@ -490,6 +490,8 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToPdf( const QString &f
( void )contextRestorer;
mLayout->renderContext().setDpi( settings.dpi );

mLayout->renderContext().setFlags( settings.flags );

// If we are not printing as raster, temporarily disable advanced effects
// as QPrinter does not support composition modes and can result
// in items missing from the output
Expand Down Expand Up @@ -561,6 +563,8 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToPdf( QgsAbstractLayou
( void )contextRestorer;
iterator->layout()->renderContext().setDpi( settings.dpi );

iterator->layout()->renderContext().setFlags( settings.flags );

// If we are not printing as raster, temporarily disable advanced effects
// as QPrinter does not support composition modes and can result
// in items missing from the output
Expand Down Expand Up @@ -671,6 +675,7 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::print( QPrinter &printer, con
( void )contextRestorer;
mLayout->renderContext().setDpi( settings.dpi );

mLayout->renderContext().setFlags( settings.flags );
// If we are not printing as raster, temporarily disable advanced effects
// as QPrinter does not support composition modes and can result
// in items missing from the output
Expand Down Expand Up @@ -730,6 +735,8 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::print( QgsAbstractLayoutItera
( void )contextRestorer;
iterator->layout()->renderContext().setDpi( settings.dpi );

iterator->layout()->renderContext().setFlags( settings.flags );

// If we are not printing as raster, temporarily disable advanced effects
// as QPrinter does not support composition modes and can result
// in items missing from the output
Expand Down Expand Up @@ -784,6 +791,7 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToSvg( const QString &f
( void )contextRestorer;
mLayout->renderContext().setDpi( settings.dpi );

mLayout->renderContext().setFlags( settings.flags );
mLayout->renderContext().setFlag( QgsLayoutRenderContext::FlagForceVectorOutput, settings.forceVectorOutput );
mLayout->renderContext().setTextRenderFormat( s.textRenderFormat );

Expand Down

0 comments on commit 8e57dad

Please sign in to comment.