Skip to content

Commit

Permalink
Fix for #5156
Browse files Browse the repository at this point in the history
  • Loading branch information
homann committed Aug 29, 2012
1 parent 24e6862 commit 412fedd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/qgsmeasuretool.cpp
Expand Up @@ -42,7 +42,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )

mDone = false;
// Append point we will move
mPoints.append( QgsPoint (0, 0) );
mPoints.append( QgsPoint( 0, 0 ) );

mDialog = new QgsMeasureDialog( this );
mSnapper.setMapCanvas( canvas );
Expand Down Expand Up @@ -91,6 +91,7 @@ void QgsMeasureTool::activate()
void QgsMeasureTool::deactivate()
{
mDialog->close();
mRubberBand->reset();
QgsMapTool::deactivate();
}

Expand All @@ -99,7 +100,7 @@ void QgsMeasureTool::restart()
{
mPoints.clear();
// Append point we will move
mPoints.append( QgsPoint (0, 0) );
mPoints.append( QgsPoint( 0, 0 ) );

mRubberBand->reset( mMeasureArea );

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

mRubberBand->movePoint( point );
if( ! mPoints.isEmpty() )
if ( ! mPoints.isEmpty() )
{
// Update last point
mPoints.removeLast();
Expand Down

0 comments on commit 412fedd

Please sign in to comment.