Bug report #12669

Could not snap to a segment on the current layer

Added by Sandro Santilli over 7 years ago. Updated over 3 years ago.

Affected QGIS version:2.8.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:20776


I'm getting the error "Could not snap to a segment on the current layer" when trying to select a POINT feature in a POINT layer fetched from PostGIS with the node tool in edit mode.

The "Snapping options" are "Snap to: Off", "Snapping mode: all layers", "Tolerance: 0 map units".
There is a single layer in the map.

The error only happens on a subset of the points. I think those points were not there when the layer was initially loaded, and they probably fall outside of the original layer extent, although "Zoom to layer" includes them.

Saving the project and re-opening it does fix the issue, which seems to confirm the problem being with those points not being present initially.

I see a few of bugs:
  1. Snapping is attempted while not requested by options
  2. Snapping to "segment" is attempted when the layer is a point layer ?
  3. New features are not visible by the snapper

This is with current 2.8 branch (pre 2.8.2).

I hadn't tried at reproducing it from scratch but I think it involves dropping and re-creating the PostGIS table after it was loaded as a layer, and adding new off-extent points to that table.


#1 Updated by Giovanni Manghi over 5 years ago

  • Easy fix? set to No
  • Regression? set to No

#2 Updated by Giovanni Manghi over 3 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF