Skip to content
Permalink
Browse files

Respect snapping while moving annotations (fix #10551)

  • Loading branch information
nyalldawson committed Jan 29, 2017
1 parent c22f5de commit 7a2be42259553c24f21566974589f6364195f662
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgsmaptoolannotation.cpp
@@ -173,7 +173,7 @@ void QgsMapToolAnnotation::canvasMoveEvent( QgsMapMouseEvent* e )
{
if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::MoveMapPosition )
{
QgsPoint mapPos = transformCanvasToAnnotation( toMapCoordinates( e->pos() ), annotation );
QgsPoint mapPos = transformCanvasToAnnotation( e->snapPoint( QgsMapMouseEvent::SnapProjectConfig ), annotation );
annotation->setMapPosition( mapPos );
annotation->setRelativePosition( QPointF( e->posF().x() / mCanvas->width(),
e->posF().y() / mCanvas->height() ) );

0 comments on commit 7a2be42

Please sign in to comment.
You can’t perform that action at this time.