Bug report #17782

New node tool needs to respect selected features

Added by Nyall Dawson over 2 years ago. Updated over 2 years ago.

Assignee:Martin Dobias
Category:Map Tools
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25678


There's certain workflows which are impossible to do with the new node tool implementation. E.g.

Have a feature
Copy it and paste it (so new feature has same geometry and exactly overlaps the original feature)
Try to move some nodes in the new feature - it's impossible to do, because the edits always apply to the original feature

Here's another example:

Have two features which share a common border
Attempt to use the node tool to realign just one of these features - it's impossible to do, because both are edited

I believe we can solve both these use cases by forcing the node tool to only operate on selected features if a selection is present.

(Assigning to Martin for feedback)

Associated revisions

Revision 64aa400f
Added by Martin Dobias over 2 years ago

Respect selection in layers in vertex tool (fixes #17782) (#6421)

This fixes issues in situations when there are multiple vertices in one location:

1. when clicking a location, if there are selected features,
the closest vertex from a selected feature will be used with priority.

2. when dragging a rectangle, if there is a selected feature,
only vertices from selected features will be used.

If there is selection in any editable layers, but away from the location where
user clicked to pick vertex (or dragged rectangle to pick multiple vertices),
the existing vertex tool behavior is not affected (so it cannot happen that
vertex tool suddenly appears to have stopped working just because there is
selection somewhere possibly outside of the current map view).


#1 Updated by Martin Dobias over 2 years ago

Yeah dealing with exactly same geometries can be a bit tricky...

Using just selected features would be a possible solution. Since node tool uses all layers in editing mode, with the active layer having the highest priority, it probably makes sense to use selection only from the active layer - otherwise if any of the layers in editing mode had some selection, it could be confusing why node tool does not pick anything.

When using just selected features, shall we have some kind of notification about that showing up automatically when the current layer has selection to avoid confusion? Or maybe have "selection only" as a mode of the node tool that would need to be enabled explicitly (e.g. in the popup menu on right-click?)

For the "another example" from ticket description, isn't the case that both features are updated only when topological editing is enabled? (which I believe is correct behavior and user should just disable topological editing)

#2 Updated by Martin Dobias over 2 years ago

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

#3 Updated by Giovanni Manghi over 2 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF