From 6221a1e8def7c3f9c3c37b824a5ce920b68d1a09 Mon Sep 17 00:00:00 2001 From: Jean Felder Date: Wed, 23 Oct 2024 20:29:32 +0200 Subject: [PATCH] qgselevationprofilecanvas: Remove the current job on clear When the canvas is cleared, the current job is not deleted. Therefore, snapping is still active. This issue is fixed by calling `cancelJobs` on clear. Closes: https://github.com/qgis/QGIS/issues/50766 --- src/gui/elevation/qgselevationprofilecanvas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/elevation/qgselevationprofilecanvas.cpp b/src/gui/elevation/qgselevationprofilecanvas.cpp index 461600886d65..cbe6cfe0a775 100644 --- a/src/gui/elevation/qgselevationprofilecanvas.cpp +++ b/src/gui/elevation/qgselevationprofilecanvas.cpp @@ -1428,7 +1428,7 @@ QVector QgsElevationProfileCanvas::identify( const QR void QgsElevationProfileCanvas::clear() { setProfileCurve( nullptr ); - mPlotItem->setRenderer( nullptr ); + cancelJobs(); mPlotItem->updatePlot(); }