From 56d39cef6a7020bd7a858aa03a7c6b14884e5ec8 Mon Sep 17 00:00:00 2001 From: uclaros Date: Tue, 6 Feb 2024 13:49:42 +0200 Subject: [PATCH] Connect to finished signal instead of rejected, as finished is fired last --- src/app/qgsmaptoolmeasureangle.cpp | 2 +- src/app/qgsmaptoolmeasurebearing.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/qgsmaptoolmeasureangle.cpp b/src/app/qgsmaptoolmeasureangle.cpp index 0a1f0c3672ab..05e99ff1a553 100644 --- a/src/app/qgsmaptoolmeasureangle.cpp +++ b/src/app/qgsmaptoolmeasureangle.cpp @@ -112,7 +112,7 @@ void QgsMapToolMeasureAngle::canvasReleaseEvent( QgsMapMouseEvent *e ) { mResultDisplay = new QgsDisplayAngle( this ); mResultDisplay->setWindowFlags( mResultDisplay->windowFlags() | Qt::Tool ); - connect( mResultDisplay, &QDialog::rejected, this, &QgsMapToolMeasureAngle::stopMeasuring ); + connect( mResultDisplay, &QDialog::finished, this, &QgsMapToolMeasureAngle::stopMeasuring ); } configureDistanceArea(); createRubberBand(); diff --git a/src/app/qgsmaptoolmeasurebearing.cpp b/src/app/qgsmaptoolmeasurebearing.cpp index 6dc8c20550af..c93b67b63b82 100644 --- a/src/app/qgsmaptoolmeasurebearing.cpp +++ b/src/app/qgsmaptoolmeasurebearing.cpp @@ -92,7 +92,7 @@ void QgsMapToolMeasureBearing::canvasReleaseEvent( QgsMapMouseEvent *e ) mResultDisplay = new QgsDisplayAngle( this ); mResultDisplay->setWindowFlags( mResultDisplay->windowFlags() | Qt::Tool ); mResultDisplay->setWindowTitle( tr( "Bearing" ) ); - connect( mResultDisplay, &QDialog::rejected, this, &QgsMapToolMeasureBearing::stopMeasuring ); + connect( mResultDisplay, &QDialog::finished, this, &QgsMapToolMeasureBearing::stopMeasuring ); } configureDistanceArea(); createRubberBand();