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 committed Jan 29, 2019
1 parent 9a723d9 commit 2752f83
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/layout/qgslayoutexporter.cpp
Expand Up @@ -492,6 +492,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 @@ -563,6 +565,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 @@ -673,6 +677,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 @@ -732,6 +737,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 @@ -786,6 +793,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 2752f83

Please sign in to comment.