Fix for labels incorrectly rendering when blend modes used

This commit is contained in:
Nyall Dawson 2013-03-24 06:43:24 +11:00
parent 6f8ee5abd4
commit 08fba255e5

View File

@ -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