Skip to content
Permalink
Browse files

Fix inconsistent use of layout render context flags

  • Loading branch information
nyalldawson committed Jan 29, 2019
1 parent 9a723d9 commit 2752f8348a5060dae3834ca40f2645e92ec4b18a
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/layout/qgslayoutexporter.cpp
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 );

0 comments on commit 2752f83

Please sign in to comment.
You can’t perform that action at this time.