Bug report #12631

QgsSnapper.snapToCurrentLayer() not working anymore in QGIS 2.8

Added by luca76 - about 9 years ago. Updated about 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Digitising
Affected QGIS version:2.8.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20746

Description

Hi, I (but not only me: [1]) discovered that QgsSnapper.snapToCurrentLayer() is not working anymore in QGIS 2.8, it returns always no result, as you can see in the sample code [1].

Is there any way to make QgsSnapper.snapToCurrentLayer working as before?

It should be fixed in 2.8.2, as it breaks plugins.

[1] http://gis.stackexchange.com/questions/138836/snaptocurrentlayer-in-qgis2-8-with-python-programming

Associated revisions

Revision e6466477
Added by Martin Dobias about 9 years ago

Make QgsMapCanvas.snapToCurrentLayer() work again (fixes #12631)

The snapper was called with screen coords instead of map coords
(due to implicit conversion QPoint->QgsPoint)

Revision 65748d50
Added by Martin Dobias about 9 years ago

Make QgsMapCanvas.snapToCurrentLayer() work again (fixes #12631)

The snapper was called with screen coords instead of map coords
(due to implicit conversion QPoint->QgsPoint)

(cherry picked from commit e6466477136a440125108cbe2406cbf971ceff19)

History

#1 Updated by cmoe - about 9 years ago

I'm encountering the same problem, and indeed, it breaks plugins. To clarify it is QgsMapCanvasSnapper.snapToCurrentLayer() not working, as also stated in the link provided above.

#2 Updated by Jürgen Fischer about 9 years ago

  • Category set to Digitising

#3 Updated by Martin Dobias about 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF