Skip to content

Commit 412fedd

Browse files
committed
Fix for #5156
1 parent 24e6862 commit 412fedd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app/qgsmeasuretool.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
4242

4343
mDone = false;
4444
// Append point we will move
45-
mPoints.append( QgsPoint (0, 0) );
45+
mPoints.append( QgsPoint( 0, 0 ) );
4646

4747
mDialog = new QgsMeasureDialog( this );
4848
mSnapper.setMapCanvas( canvas );
@@ -91,6 +91,7 @@ void QgsMeasureTool::activate()
9191
void QgsMeasureTool::deactivate()
9292
{
9393
mDialog->close();
94+
mRubberBand->reset();
9495
QgsMapTool::deactivate();
9596
}
9697

@@ -99,7 +100,7 @@ void QgsMeasureTool::restart()
99100
{
100101
mPoints.clear();
101102
// Append point we will move
102-
mPoints.append( QgsPoint (0, 0) );
103+
mPoints.append( QgsPoint( 0, 0 ) );
103104

104105
mRubberBand->reset( mMeasureArea );
105106

@@ -144,7 +145,7 @@ void QgsMeasureTool::canvasMoveEvent( QMouseEvent * e )
144145
QgsPoint point = snapPoint( e->pos() );
145146

146147
mRubberBand->movePoint( point );
147-
if( ! mPoints.isEmpty() )
148+
if ( ! mPoints.isEmpty() )
148149
{
149150
// Update last point
150151
mPoints.removeLast();

0 commit comments

Comments
 (0)