Skip to content

Commit

Permalink
Fix bug with rotated labels
Browse files Browse the repository at this point in the history
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
  • Loading branch information
wonder-sk committed Sep 24, 2015
1 parent 7b48d95 commit d20ff23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgspallabeling.cpp
Expand Up @@ -2574,7 +2574,8 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
*labelFeature = lf;
( *labelFeature )->setHasFixedPosition( dataDefinedPosition );
( *labelFeature )->setFixedPosition( QgsPoint( xPos, yPos ) );
( *labelFeature )->setHasFixedAngle( dataDefinedRotation );
// use layer-level defined rotation, but not if position fixed
( *labelFeature )->setHasFixedAngle( dataDefinedRotation || ( !dataDefinedPosition && angle != 0 ) );
( *labelFeature )->setFixedAngle( angle );
( *labelFeature )->setQuadOffset( QPointF( quadOffsetX, quadOffsetY ) );
( *labelFeature )->setPositionOffset( QgsPoint( offsetX, offsetY ) );
Expand Down

0 comments on commit d20ff23

Please sign in to comment.