Skip to content
Permalink
Browse files

Fix for labels incorrectly rendering when blend modes used

  • Loading branch information
nyalldawson committed Mar 23, 2013
1 parent 6f8ee5a commit 08fba255e5150c78571bfbd7aa2a1265e0878a19
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/core/qgsmaprenderer.cpp
@@ -385,10 +385,10 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
.arg( ml->extent().toString() )
.arg( ml->blendMode() )
);

// Set the QPainter composition mode so that this layer is rendered using
// the desired blending mode
mypContextPainter->setCompositionMode(ml->getCompositionMode());
mypContextPainter->setCompositionMode( ml->getCompositionMode() );

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

QgsDebugMsg( "Done rendering map layers" );

// Reset the composition mode before rendering the labels
mRenderContext.painter()->setCompositionMode( QPainter::CompositionMode_SourceOver );

if ( !mOverview )
{
// render all labels for vector layers in the stack, starting at the base

0 comments on commit 08fba25

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