From 43c4cd72ada19e9293a0c881ee5fb42acab74cc7 Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Mon, 20 Oct 2014 23:57:33 +0700 Subject: [PATCH] Fix #10956 (QgsSnapper crash/freeze/issues) QgsMapSettings instance of QgsMapCanvas may have been prematurely deleted by SIP. The KeepReference annotation will force QgsMapCanvas wrapper to keep one more ref to it, so its reference count will not go to zero while map canvas is still alive. --- python/gui/qgsmapcanvas.sip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/gui/qgsmapcanvas.sip b/python/gui/qgsmapcanvas.sip index c3e7db17876..b2742b9c535 100644 --- a/python/gui/qgsmapcanvas.sip +++ b/python/gui/qgsmapcanvas.sip @@ -58,7 +58,7 @@ class QgsMapCanvas : QGraphicsView //! Get access to properties used for map rendering //! @note added in 2.4 - const QgsMapSettings& mapSettings() const; + const QgsMapSettings& mapSettings() const /KeepReference/; //! sets whether to use projections for this layer set //! @note added in 2.4