Skip to content
Permalink
Browse files
Fix for jumps if moving diagrams and labels with rotation point other…
… 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 8d364cb1ca4a18799a1ea0ebabc7d2d7a59539bb
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/app/qgsmaptoolmovelabel.cpp
@@ -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();
}
}

0 comments on commit 8d364cb

Please sign in to comment.