Skip to content

Commit 6749c8d

Browse files
committed
Fix double delete in QgsMeasureTool
The rubber bands are owned by the canvas - so we shouldn't be deleting them here.
1 parent 70aad93 commit 6749c8d

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/app/qgsmeasuretool.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas *canvas, bool measureArea )
5656
connect( canvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsMeasureTool::updateSettings );
5757
}
5858

59-
QgsMeasureTool::~QgsMeasureTool()
60-
{
61-
delete mDialog;
62-
delete mRubberBand;
63-
delete mRubberBandPoints;
64-
}
65-
66-
6759
QVector<QgsPointXY> QgsMeasureTool::points()
6860
{
6961
return mPoints;

src/app/qgsmeasuretool.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ class APP_EXPORT QgsMeasureTool : public QgsMapTool
3535

3636
QgsMeasureTool( QgsMapCanvas *canvas, bool measureArea );
3737

38-
~QgsMeasureTool() override;
39-
4038
Flags flags() const override { return QgsMapTool::AllowZoomRect; }
4139

4240
//! returns whether measuring distance or area

0 commit comments

Comments
 (0)