File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,8 @@ namespace QgsWms
413
413
dpi = _dpi;
414
414
}
415
415
exportSettings.dpi = dpi;
416
+ // Draw selections
417
+ exportSettings.flags |= QgsLayoutRenderContext::FlagDrawSelection;
416
418
// Destination image size in px
417
419
QgsLayoutSize layoutSize ( layout->pageCollection ()->page ( 0 )->sizeWithUnits () );
418
420
QgsLayoutMeasurement width ( layout->convertFromLayoutUnits ( layoutSize.width (), QgsUnitTypes::LayoutUnit::LayoutMillimeters ) );
@@ -435,6 +437,8 @@ namespace QgsWms
435
437
if ( ok )
436
438
exportSettings.dpi = dpi;
437
439
}
440
+ // Draw selections
441
+ exportSettings.flags |= QgsLayoutRenderContext::FlagDrawSelection;
438
442
// Export all pages
439
443
QgsLayoutExporter exporter ( layout.get () );
440
444
exporter.exportToPdf ( tempOutputFile.fileName (), exportSettings );
@@ -450,8 +454,6 @@ namespace QgsWms
450
454
451
455
bool QgsRenderer::configurePrintLayout ( QgsPrintLayout *c, const QgsMapSettings &mapSettings )
452
456
{
453
- c->renderContext ().setSelectionColor ( mapSettings.selectionColor () );
454
- c->renderContext ().setFlag ( QgsLayoutRenderContext::FlagDrawSelection, true );
455
457
// Maps are configured first
456
458
QList<QgsLayoutItemMap *> maps;
457
459
c->layoutItems <QgsLayoutItemMap>( maps );
You can’t perform that action at this time.
0 commit comments