Skip to content

Commit 494fa15

Browse files
committed
Fix node tool sometimes behaving incorrectly with topo editing
This would happen especially when zoomed out due to mismatch of snapping match vs original map point
1 parent 7c9105d commit 494fa15

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/app/nodetool/qgsnodetool.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,11 +1030,11 @@ void QgsNodeTool::startDragging( QgsMapMouseEvent *e )
10301030
}
10311031
else // vertex
10321032
{
1033-
startDraggingMoveVertex( e->mapPoint(), m );
1033+
startDraggingMoveVertex( m );
10341034
}
10351035
}
10361036

1037-
void QgsNodeTool::startDraggingMoveVertex( const QgsPointXY &mapPoint, const QgsPointLocator::Match &m )
1037+
void QgsNodeTool::startDraggingMoveVertex( const QgsPointLocator::Match &m )
10381038
{
10391039
Q_ASSERT( m.hasVertex() );
10401040

@@ -1079,7 +1079,7 @@ void QgsNodeTool::startDraggingMoveVertex( const QgsPointXY &mapPoint, const Qgs
10791079
if ( !vlayer || !vlayer->isEditable() )
10801080
continue;
10811081

1082-
for ( const QgsPointLocator::Match &otherMatch : layerVerticesSnappedToPoint( vlayer, mapPoint ) )
1082+
for ( const QgsPointLocator::Match &otherMatch : layerVerticesSnappedToPoint( vlayer, m.point() ) )
10831083
{
10841084
if ( otherMatch.layer() == m.layer() &&
10851085
otherMatch.featureId() == m.featureId() &&

src/app/nodetool/qgsnodetool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class APP_EXPORT QgsNodeTool : public QgsMapToolAdvancedDigitizing
133133

134134
void startDragging( QgsMapMouseEvent *e );
135135

136-
void startDraggingMoveVertex( const QgsPointXY &mapPoint, const QgsPointLocator::Match &m );
136+
void startDraggingMoveVertex( const QgsPointLocator::Match &m );
137137

138138
//! Get list of matches of all vertices of a layer exactly snapped to a map point
139139
QList<QgsPointLocator::Match> layerVerticesSnappedToPoint( QgsVectorLayer *layer, const QgsPointXY &mapPoint );

0 commit comments

Comments
 (0)