Skip to content

Commit 91c19ff

Browse files
committed
[Bugfix][Server][GetPrint] Correctly set way to draw selection in layout settings
1 parent eae047e commit 91c19ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/services/wms/qgswmsrenderer.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ namespace QgsWms
413413
dpi = _dpi;
414414
}
415415
exportSettings.dpi = dpi;
416+
// Draw selections
417+
exportSettings.flags |= QgsLayoutRenderContext::FlagDrawSelection;
416418
// Destination image size in px
417419
QgsLayoutSize layoutSize( layout->pageCollection()->page( 0 )->sizeWithUnits() );
418420
QgsLayoutMeasurement width( layout->convertFromLayoutUnits( layoutSize.width(), QgsUnitTypes::LayoutUnit::LayoutMillimeters ) );
@@ -435,6 +437,8 @@ namespace QgsWms
435437
if ( ok )
436438
exportSettings.dpi = dpi;
437439
}
440+
// Draw selections
441+
exportSettings.flags |= QgsLayoutRenderContext::FlagDrawSelection;
438442
// Export all pages
439443
QgsLayoutExporter exporter( layout.get() );
440444
exporter.exportToPdf( tempOutputFile.fileName(), exportSettings );
@@ -450,8 +454,6 @@ namespace QgsWms
450454

451455
bool QgsRenderer::configurePrintLayout( QgsPrintLayout *c, const QgsMapSettings &mapSettings )
452456
{
453-
c->renderContext().setSelectionColor( mapSettings.selectionColor() );
454-
c->renderContext().setFlag( QgsLayoutRenderContext::FlagDrawSelection, true );
455457
// Maps are configured first
456458
QList<QgsLayoutItemMap *> maps;
457459
c->layoutItems<QgsLayoutItemMap>( maps );

0 commit comments

Comments
 (0)