Bug report #21283

Vertex Tool: issue selecting vertices of "locked" features

Added by Geo Dev over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Digitising
Affected QGIS version:3.5(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29101

Description

In the last release (QGIS 3.5master), when a feature is "locked", the Vertex Tool doesn't highlight other features and it doesn't allow selection of vertices from other features (https://github.com/qgis/QGIS/pull/9116).

This behavior doesn't always work as expected when the vertices of the "locked" feature are in common with vertices of other features of the same layer.

Steps to replicate the issue:
  • create a new polygon layer
  • draw two adjacent polygons with some common edges/vertices
  • active the Vertex Tool and "lock" one of the two polygons (right click on the feature)
  • put the mouse pointer over a non common edge of the "locked" polygon and move the pointer toward a common vertex: when the pointer is near/over the common vertex it's highlighted (expected behavior)
  • put the mouse pointer over a non common edge of the other "unlocked" polygon and move the pointer toward a common vertex: when the pointer is near/over the common vertex it's NOT highlighted (unexpected behavior).

All the vertices of the "locked" feature should always be highlighted when the pointer is near/over them and it should not depend on the mouse path used to point them.

Associated revisions

Revision aec87a0a
Added by Martin Dobias over 5 years ago

Fix issue with selection of vertices of locked feature (fixes #21283)

When user was coming with mouse to a vertex of the locked feature
from a different feature, it could happen that the vertex would not
get picked by vertex tool - this was because snapToEditableLayer()
keeps the last snap which would belong to a different feature, but
that feature was not allowed (blocking a new snap).

The fix makes sure that with a locked feature its matches always win.

Revision bdec90c4
Added by Martin Dobias over 5 years ago

Fix issue with selection of vertices of locked feature (fixes #21283)

When user was coming with mouse to a vertex of the locked feature
from a different feature, it could happen that the vertex would not
get picked by vertex tool - this was because snapToEditableLayer()
keeps the last snap which would belong to a different feature, but
that feature was not allowed (blocking a new snap).

The fix makes sure that with a locked feature its matches always win.

(cherry picked from commit aec87a0a895d11fa9d054a979f0e02a3b4bb0c78)

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Priority changed from High to Normal

#2 Updated by Martin Dobias over 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF