Skip to content

Commit

Permalink
Fix for jumps if moving diagrams and labels with rotation point other…
Browse files Browse the repository at this point in the history
… than lower left

git-svn-id: http://svn.osgeo.org/qgis/trunk@15683 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 8, 2011
1 parent 9007d89 commit 8d364cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/qgsmaptoolmovelabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ void QgsMapToolMoveLabel::canvasPressEvent( QMouseEvent * e )
if ( labelMoveable( layer, xCol, yCol ) || diagramMoveable( layer, xCol, yCol ) )
{
mStartPointMapCoords = toMapCoordinates( e->pos() );
mClickOffsetX = mStartPointMapCoords.x() - mCurrentLabelPos.labelRect.xMinimum();
mClickOffsetY = mStartPointMapCoords.y() - mCurrentLabelPos.labelRect.yMinimum();
QgsPoint referencePoint;
if ( !rotationPoint( referencePoint ) )
{
referencePoint.setX( mCurrentLabelPos.labelRect.xMinimum() );
referencePoint.setY( mCurrentLabelPos.labelRect.yMinimum() );
}
mClickOffsetX = mStartPointMapCoords.x() - referencePoint.x();
mClickOffsetY = mStartPointMapCoords.y() - referencePoint.y();
createRubberBands();
}
}
Expand Down

0 comments on commit 8d364cb

Please sign in to comment.