Bug report #18434

QGIS 3.0 new node tool picks up nodes of hidden layers & isn;t constrained by selected layers

Added by Sarah Popov over 1 year ago. Updated 9 months ago.

Status:Closed
Priority:High
Assignee:Martin Dobias
Category:Digitising
Affected QGIS version:3.4.4 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26323

Description

According to the QGIS 3.0 release site1,

If there is a need to constrain selection of vertices to just specific feature(s), it is possible to select the features with selection tool first - the vertex tool will only work with vertices from selected feature(s) in such cases.
Two main bugs I am experiencing:
  1. If two separate layers are in Edit mode, selecting the one layer feature I wish to edit does not constrain the node tool. It highlights & selects nodes from any layer in Edit mode, regardless of what is selected.
  2. Regardless of whether or not hidden layers are in edit mode, and regardless of whether or not the feature I wish to edit is selected, the node tool also highlights and selects nodes from all hidden layers in my project.

In short: selecting a feature does not constrain the node tool to only this feature. The node tool also highlights and selects vertices of hidden layers.

I've attached a .gif of these behaviors. The 3 shapefiles I'm using are the Natural Earth bathymetry2, Natural Earth land3, and an IUCN species distribution like this one4.

[1] http://changelog.qgis.org/en/qgis/version/3.0.0/#overhaul-of-vertex-tool
[2] http://www.naturalearthdata.com/downloads/10m-physical-vectors/10m-bathymetry/
[3] http://www.naturalearthdata.com/downloads/10m-physical-vectors/10m-land/
[4] http://maps.iucnredlist.org/map.html?id=132751

qgis-3-node-tool-bug.gif - screencast node tool behavior (980 KB) Sarah Popov, 2018-03-13 07:36 PM


Related issues

Related to QGIS Application - Bug report #18628: QGIS 3: vertex editor highlights features in non-visible ... Closed 2018-04-04
Duplicated by QGIS Application - Bug report #19725: vertex tool snapping to all layers Closed 2018-08-28

Associated revisions

Revision dd97201d
Added by Martin Dobias 9 months ago

[vertex tool] Fix issue with hidden layers being editable (fixes #18434)

The problem was that QgsSnappingConfig when initialized from a project
loads global settings from QgsSettings and sets individual layer configs
based on that.

The issue was showing up only in "current layer" mode of vertex tool
because for "all layers" mode all individual layer configs were overwritten.

Revision 2ad47198
Added by Martin Dobias 9 months ago

[vertex tool] Fix issue with hidden layers being editable (fixes #18434)

The problem was that QgsSnappingConfig when initialized from a project
loads global settings from QgsSettings and sets individual layer configs
based on that.

The issue was showing up only in "current layer" mode of vertex tool
because for "all layers" mode all individual layer configs were overwritten.

(cherry picked from commit dd97201d1b08edb3e451a8bb8e0af4203793c034)

History

#1 Updated by Regis Haubourg over 1 year ago

Hi,
in fact, if I tested well, selecting a feature does not limit the node tool to this feature but gives priority to it. This was done because in some cases, it was not possible to grab the desired feature.
I would suggest you open two separate issues.
I'm starting to think that we probably will want edit modes limited to one layer, and selected feature only. The multi layer edit node also triggers new issues when working with database triggers.
However, editing all nodes at once is really neat when you need to preserve topology of multiple layers.

#2 Updated by Giovanni Manghi over 1 year ago

  • Status changed from Open to Feedback

#3 Updated by Eron Lloyd over 1 year ago

While I, too, love the new vertex tool, it is definitely not what I expected once I started upgrading. Making it an option seems fine, but I wouldn't recommend it as the default. Another problem it creates is when you have multiple layers snapped to the same point, and wish to edit one of the nodes. Unless I'm doing something wrong, this can be difficult to isolate the right layer, and I've been having to literally move the other features out of the way and then move them back so I don't keep selecting the wrong ones.

Turning off the other layers does not change this, either, which lead to some extended frustration while editing some complex maps with multiple instances of the same layer that were styled differently. We were forced to remove the other layers while editing and then re-add them and their styling once we were done. This gives the sense that you're moving the right vertex, but then nothing happens, which makes it seem like this is a bug when it's apparently a feature...

+1 for options to manage this functionality. I'm thinking of making a brief tutorial video explaining the new tool and pointing out the aspects that can trip someone up, which I'll post here to help others while we're waiting on tool changes.

#4 Updated by Eron Lloyd over 1 year ago

UPDATE: I believe that there might be a patch (#18628) for this already? Should this issue be updated accordingly?

#5 Updated by Jürgen Fischer over 1 year ago

  • Related to Bug report #18628: QGIS 3: vertex editor highlights features in non-visible layers added

#6 Updated by Stefan Overkamp about 1 year ago

QGIS 3.2.2
Editing complex maps with multiple instances of the same layer or layers with similar geometry is very error prone.
The vertex editor chooses vertices from invisible and non-editbale layers.
Moved vertices of such layers are not moved. No chance to select the "right" vertex.

Vertices of invisible Layers should not be choosen by the vertex tool.

#7 Updated by Harrissou Santanna about 1 year ago

Vertices of invisible Layers should not be choosen by the vertex tool.

Deactivate the Settings --> Options --> Digitizing --> Enable snapping on invisible features (not shown on the map canvas)

#8 Updated by Giovanni Manghi about 1 year ago

Harrissou Santanna wrote:

Vertices of invisible Layers should not be choosen by the vertex tool.

Deactivate the Settings --> Options --> Digitizing --> Enable snapping on invisible features (not shown on the map canvas)

I think this "solves" the issue, correct? Closing?

#9 Updated by Harrissou Santanna about 1 year ago

Giovanni Manghi wrote:

Harrissou Santanna wrote:

Vertices of invisible Layers should not be choosen by the vertex tool.

Deactivate the Settings --> Options --> Digitizing --> Enable snapping on invisible features (not shown on the map canvas)

I think this "solves" the issue, correct?

I think it would do if there was not #19260

#10 Updated by Giovanni Manghi about 1 year ago

I think it would do if there was not #19260

so that is the real issue, and this should be closed, correct?

#11 Updated by Jürgen Fischer about 1 year ago

#12 Updated by Borys Jurgiel about 1 year ago

  • Regression? changed from No to Yes
  • Priority changed from Normal to High
  • Assignee set to Martin Dobias

It has nothing to do with snapping, it's about picking up vertices for editing. Another words:

Vertex Tool (All Layers mode) works fine: it takes vertices from all layers in editing mode
Vertex Tool (Current Layer mode) is broken: it takes vertices from the current layer PLUS from all the hidden layers

I'm setting a high priority and regression as it can make the vertex tool completely unusable if you want to keep some complex layers hidden.

#13 Updated by Borys Jurgiel about 1 year ago

  • Operating System deleted (Windows 7)

#14 Updated by Bernhard Ströbl 11 months ago

I cannot reproduce this issue in QGIS 3.4.1 (Ubuntu)
Steps taken (test 1):
  1. Two layers in editing mode, two identical polygons
  2. Layer 1 is visible, layer 2 is not visible
  3. Layer 1 is active, layer 2 is not active
  4. Vertex tool with current layer mode
  5. Moving a node does only move it in layer 1, layer 2 stays unchanged => expected behaviuor
test 2:
  1. as above
  2. both layers visible
  3. as above
  4. as above
  5. Moving a node does only move it in layer 1 if topological editing is disabled => expected behaviour
  6. Moving a node does move it in both layers if topolgical editing is enabled => IMHO Bug (but different from what has been described in this issue, new ticket?)

topological editing setting has no influence on test 1

#15 Updated by Paolo Cavallini 10 months ago

So should this be closed?
Thanks.

#16 Updated by Miroslav Sihelsky 9 months ago

I experience issue with this.Link to below demonstrate the issue.
When you edit layer polygons and other layers in the canvas are visible everything is ok.
When you make other layers (such as area in my video coloured brown/yellow) invisible, the node tools picks features from the hidden layer.

https://drive.google.com/file/d/1W_luHLA6Ak-4QBFcZD8bhMxdCWdoWDRN/view?usp=sharing

#17 Updated by Lukáš Hríbik 9 months ago

I'm not able to edit vertex in my project at all. QGIS 3.4.4. Vertex tool current layer, topological editing disabled, only one layer in edit mode:
- vertex tools pickup nodes of hidden layers
- i have many (unvisible) layers with same/similar polygons (historic versions of feature), vertex tool is unable to pickup node of active layer (it pickup node of hidden layer at same position)
- I need to remove all hidden layers from project to edit active layer

#18 Updated by Martin Dobias 9 months ago

I cannot replicate, sorry...

Can someone provide clear steps how to reproduce the issue? Make sure to also mention 1. which layers are turned on/off, 2. which layers is the current layer, 3. whether using "all layers" or "current layer" vertex tool variant, 4. whether topo editing is enabled, 5. which version of QGIS do you use.

#19 Updated by Lukáš Hríbik 9 months ago

Martin Dobias wrote:

I cannot replicate, sorry...

Can someone provide clear steps how to reproduce the issue? Make sure to also mention 1. which layers are turned on/off, 2. which layers is the current layer, 3. whether using "all layers" or "current layer" vertex tool variant, 4. whether topo editing is enabled, 5. which version of QGIS do you use.

I'm attaching video of issue:
http://www.icsp.sk/20190124_190748.mp4

#20 Updated by Giovanni Manghi 9 months ago

  • Status changed from Feedback to Open
  • Affected QGIS version changed from 3.0.0 to 3.4.4

#21 Updated by Miroslav Sihelsky 9 months ago

Hi all. With Martin's help, I found what was causing an issue for me.
In the Settings->Options and under Digitizing tab I had the "Enable snapping by default" ticked. Once this is not enabled, QGIS vertex tool works as expected.

Miro

#22 Updated by Martin Dobias 9 months ago

  • Status changed from Open to Feedback

@Lukas thanks for the screen cast - really strange. Could you please attach a demo project where it is possible to replicate this behavior? Because when I try to do the same thing with my test data, everything works correctly...

#23 Updated by Martin Dobias 9 months ago

  • Status changed from Feedback to Open

Ahh with Miro's hint I am able to replicate now - @Lukas can you confirm you have this option in Settings enabled too?

#24 Updated by Giovanni Manghi 9 months ago

Martin Dobias wrote:

@Lukas thanks for the screen cast - really strange. Could you please attach a demo project where it is possible to replicate this behavior? Because when I try to do the same thing with my test data, everything works correctly...

also try with a new/clean profile: NO 3rd party plugins installed.

#25 Updated by Lukáš Hríbik 9 months ago

Martin Dobias wrote:

Ahh with Miro's hint I am able to replicate now - @Lukas can you confirm you have this option in Settings enabled too?

Yes, I had this option enabled. Everything seems ok after I disabled it.

#26 Updated by Martin Dobias 9 months ago

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

Also available in: Atom PDF