Skip to content

Commit 7a2be42

Browse files
committed
Respect snapping while moving annotations (fix #10551)
1 parent c22f5de commit 7a2be42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/qgsmaptoolannotation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void QgsMapToolAnnotation::canvasMoveEvent( QgsMapMouseEvent* e )
173173
{
174174
if ( mCurrentMoveAction == QgsMapCanvasAnnotationItem::MoveMapPosition )
175175
{
176-
QgsPoint mapPos = transformCanvasToAnnotation( toMapCoordinates( e->pos() ), annotation );
176+
QgsPoint mapPos = transformCanvasToAnnotation( e->snapPoint( QgsMapMouseEvent::SnapProjectConfig ), annotation );
177177
annotation->setMapPosition( mapPos );
178178
annotation->setRelativePosition( QPointF( e->posF().x() / mCanvas->width(),
179179
e->posF().y() / mCanvas->height() ) );

0 commit comments

Comments
 (0)