Skip to content

Commit

Permalink
Fix double delete in QgsMeasureTool
Browse files Browse the repository at this point in the history
The rubber bands are owned by the canvas - so we shouldn't
be deleting them here.
  • Loading branch information
nyalldawson committed May 3, 2018
1 parent 70aad93 commit 6749c8d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/app/qgsmeasuretool.cpp
Expand Up @@ -56,14 +56,6 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas *canvas, bool measureArea )
connect( canvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsMeasureTool::updateSettings );
}

QgsMeasureTool::~QgsMeasureTool()
{
delete mDialog;
delete mRubberBand;
delete mRubberBandPoints;
}


QVector<QgsPointXY> QgsMeasureTool::points()
{
return mPoints;
Expand Down
2 changes: 0 additions & 2 deletions src/app/qgsmeasuretool.h
Expand Up @@ -35,8 +35,6 @@ class APP_EXPORT QgsMeasureTool : public QgsMapTool

QgsMeasureTool( QgsMapCanvas *canvas, bool measureArea );

~QgsMeasureTool() override;

Flags flags() const override { return QgsMapTool::AllowZoomRect; }

//! returns whether measuring distance or area
Expand Down

0 comments on commit 6749c8d

Please sign in to comment.