Skip to content

Commit

Permalink
Fix data defined rotation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 8, 2019
1 parent 348d216 commit c1bbe2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/symbology/qgsmarkersymbollayer.cpp
Expand Up @@ -645,6 +645,7 @@ void QgsSimpleMarkerSymbolLayerBase::calculateOffsetAndRotation( QgsSymbolRender
markerOffset( context, scaledSize, scaledSize, offsetX, offsetY );
offset = QPointF( offsetX, offsetY );

hasDataDefinedRotation = false;
//angle
bool ok = true;
angle = mAngle + mLineAngle;
Expand All @@ -656,9 +657,12 @@ void QgsSimpleMarkerSymbolLayerBase::calculateOffsetAndRotation( QgsSymbolRender
// If the expression evaluation was not successful, fallback to static value
if ( !ok )
angle = mAngle + mLineAngle;

hasDataDefinedRotation = true;
}

hasDataDefinedRotation = context.renderHints() & QgsSymbol::DynamicRotation;
hasDataDefinedRotation = context.renderHints() & QgsSymbol::DynamicRotation || hasDataDefinedRotation;

if ( hasDataDefinedRotation )
{
// For non-point markers, "dataDefinedRotation" means following the
Expand Down

0 comments on commit c1bbe2f

Please sign in to comment.