Skip to content
Permalink
Browse files
Fix map rotation not considered for ellipse marker data defined rotat…
…ion (fix #13367)
  • Loading branch information
nyalldawson committed Oct 5, 2015
1 parent b09877b commit 481bd9531efc520557b050bfa83a7b815dea0857
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/symbology-ng/qgsellipsesymbollayerv2.cpp
@@ -263,15 +263,20 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend

//priority for rotation: 1. data defined symbol level, 2. symbol layer rotation (mAngle)
double rotation = 0.0;

if ( hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_ROTATION ) )
{
context.setOriginalValueVariable( mAngle );
rotation = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_ROTATION, context, mAngle ).toDouble() + mLineAngle;

const QgsMapToPixel& m2p = context.renderContext().mapToPixel();
rotation += m2p.mapRotation();
}
else if ( !qgsDoubleNear( mAngle + mLineAngle, 0.0 ) )
{
rotation = mAngle + mLineAngle;
}

if ( rotation )
off = _rotatedOffset( off, rotation );

0 comments on commit 481bd95

Please sign in to comment.