Bug report #15794

snapping is always on, fails to respect default setting, upon QGIS launch

Added by Mathieu Pellerin - nIRV about 8 years ago. Updated about 8 years ago.

Status:Closed
Priority:High
Assignee:Matthias Kuhn
Category:Digitising
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:23714

Description

Since the snapping refactoring, snapping is always active upon QGIS launch, even though I set the snapping default to Off.

Looking into the code, I see this line as checking whether snapping should be enabled or not:

 bool enabled = QSettings().value( QStringLiteral( "/qgis/digitizing/default_advanced_snap_enabled" ), true ).toBool();

The "default_advanced_snap_enabled" setting is however never set in QgsOptions, neither anywhere else in QGIS' source tree.

History

#1 Updated by Mathieu Pellerin - nIRV about 8 years ago

Similarly, the code uses "default_snap_type" as its setting key for snapping type (i.e. vertex, segment, vertexandsegment):

SnappingType type = ( SnappingType )QSettings().value( QStringLiteral( "/qgis/digitizing/default_snap_type" ), Vertex ).toInt();

However, QgsOptions never sets the "default_snap_type" value.

#2 Updated by Mathieu Pellerin - nIRV about 8 years ago

  • Resolution set to fixed/implemented
  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Fixed on master.

Also available in: Atom PDF