Skip to content
Permalink
Browse files

Fix bad fills when using marker line with render effects (fix #15696)

(cherry-picked from a0bfc10, 55f207)
  • Loading branch information
nyalldawson committed Oct 17, 2016
1 parent 11627e8 commit d1aff824f7268a80c0b38b6518ecfc91832894a7
Showing with 10 additions and 0 deletions.
  1. +5 −0 src/core/effects/qgspainteffect.cpp
  2. +5 −0 src/core/symbology-ng/qgslinesymbollayerv2.cpp
@@ -162,6 +162,11 @@ void QgsPaintEffect::end( QgsRenderContext &context )
context.setPainter( mPrevPainter );
mPrevPainter = nullptr;

// clear any existing pen/brush - sometimes these are not correctly restored when restoring a painter
// with a QPicture destination - see #15696
context.painter()->setPen( Qt::NoPen );
context.painter()->setBrush( Qt::NoBrush );

//draw using effect
render( *mTempPicture, context );

@@ -885,6 +885,9 @@ void QgsMarkerLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
}
}


context.renderContext().painter()->save();

if ( qgsDoubleNear( offset, 0.0 ) )
{
if ( placement == Interval )
@@ -911,6 +914,8 @@ void QgsMarkerLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
renderPolylineVertex( points2, context, placement );
}
}

context.renderContext().painter()->restore();
}

void QgsMarkerLineSymbolLayerV2::renderPolygonOutline( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context )

0 comments on commit d1aff82

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