Skip to content
Permalink
Browse files

[Bugfix][Server][GetPrint] Correctly set way to draw selection in lay…

…out settings
  • Loading branch information
rldhont committed Oct 26, 2018
1 parent eae047e commit 91c19ff53f7168030e6e7f60789a3cb65816caf4
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/server/services/wms/qgswmsrenderer.cpp
@@ -413,6 +413,8 @@ namespace QgsWms
dpi = _dpi;
}
exportSettings.dpi = dpi;
// Draw selections
exportSettings.flags |= QgsLayoutRenderContext::FlagDrawSelection;
// Destination image size in px
QgsLayoutSize layoutSize( layout->pageCollection()->page( 0 )->sizeWithUnits() );
QgsLayoutMeasurement width( layout->convertFromLayoutUnits( layoutSize.width(), QgsUnitTypes::LayoutUnit::LayoutMillimeters ) );
@@ -435,6 +437,8 @@ namespace QgsWms
if ( ok )
exportSettings.dpi = dpi;
}
// Draw selections
exportSettings.flags |= QgsLayoutRenderContext::FlagDrawSelection;
// Export all pages
QgsLayoutExporter exporter( layout.get() );
exporter.exportToPdf( tempOutputFile.fileName(), exportSettings );
@@ -450,8 +454,6 @@ namespace QgsWms

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

0 comments on commit 91c19ff

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