Skip to content

Commit

Permalink
Fix map rotation not considered for ellipse marker data defined rotat…
Browse files Browse the repository at this point in the history
…ion (fix #13367)
  • Loading branch information
nyalldawson committed Oct 5, 2015
1 parent b09877b commit 481bd95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/symbology-ng/qgsellipsesymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit 481bd95

Please sign in to comment.