Skip to content

Commit 08fba25

Browse files
committedMar 23, 2013
Fix for labels incorrectly rendering when blend modes used
1 parent 6f8ee5a commit 08fba25

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎src/core/qgsmaprenderer.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
385385
.arg( ml->extent().toString() )
386386
.arg( ml->blendMode() )
387387
);
388-
388+
389389
// Set the QPainter composition mode so that this layer is rendered using
390390
// the desired blending mode
391-
mypContextPainter->setCompositionMode(ml->getCompositionMode());
391+
mypContextPainter->setCompositionMode( ml->getCompositionMode() );
392392

393393
if ( !ml->hasScaleBasedVisibility() || ( ml->minimumScale() <= mScale && mScale < ml->maximumScale() ) || mOverview )
394394
{
@@ -559,6 +559,9 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
559559

560560
QgsDebugMsg( "Done rendering map layers" );
561561

562+
// Reset the composition mode before rendering the labels
563+
mRenderContext.painter()->setCompositionMode( QPainter::CompositionMode_SourceOver );
564+
562565
if ( !mOverview )
563566
{
564567
// render all labels for vector layers in the stack, starting at the base

0 commit comments

Comments
 (0)
Please sign in to comment.