Skip to content

Commit 0171aa2

Browse files
committed
Do not keep highlight when locking/unlocking feature
It was a bit strange effect when locking feature... when moving mouse over a feature it would have highlight, then on right click it would also get vertex editor square markers in addition to the highlight, but then immediately after mouse move the original highlight would be gone. Now it's simplified so that feature highlight on right click gets removed. (cherry picked from commit 6fd21c2)
1 parent 525bf5f commit 0171aa2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/vertextool/qgsvertextool.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,6 @@ void QgsVertexTool::tryToSelectFeature( QgsMapMouseEvent *e )
959959
// we have a feature to select
960960
QPair<QgsVectorLayer *, QgsFeatureId> alternative = mSelectedFeatureAlternatives->alternatives.at( mSelectedFeatureAlternatives->index );
961961
updateVertexEditor( alternative.first, alternative.second );
962-
updateFeatureBand( QgsPointLocator::Match( QgsPointLocator::Area, alternative.first, alternative.second, 0, QgsPointXY() ) );
963962
}
964963
else
965964
{
@@ -970,8 +969,11 @@ void QgsVertexTool::tryToSelectFeature( QgsMapMouseEvent *e )
970969
{
971970
mVertexEditor->updateEditor( nullptr );
972971
}
973-
updateFeatureBand( QgsPointLocator::Match() );
974972
}
973+
974+
// we have either locked ourselves to a feature or unlocked again
975+
// in any case, we don't want feature highlight anymore (vertex editor has its own highlight)
976+
updateFeatureBand( QgsPointLocator::Match() );
975977
}
976978

977979

0 commit comments

Comments
 (0)