mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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
This commit is contained in:
parent
9007d89bb5
commit
8d364cb1ca
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user