Skip to content

Commit

Permalink
Fix for labels incorrectly rendering when blend modes used
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 23, 2013
1 parent 6f8ee5a commit 08fba25
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/qgsmaprenderer.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 08fba25

Please sign in to comment.