Skip to content

Commit

Permalink
allow reactivation of measurement after deactivation
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 27, 2014
1 parent b3d19d6 commit f28b634
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/app/qgsmeasuretool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
mPoints.append( QgsPoint( 0, 0 ) );

mDialog = new QgsMeasureDialog( this, Qt::WindowStaysOnTopHint );
mDialog->restorePosition();
mSnapper.setMapCanvas( canvas );

connect( canvas, SIGNAL( destinationCrsChanged() ),
Expand All @@ -68,7 +69,7 @@ const QList<QgsPoint>& QgsMeasureTool::points()

void QgsMeasureTool::activate()
{
mDialog->restorePosition();
mDialog->show();
QgsMapTool::activate();

// ensure that we have correct settings
Expand All @@ -95,13 +96,10 @@ void QgsMeasureTool::activate()

void QgsMeasureTool::deactivate()
{
mDialog->close();
mRubberBand->reset();
mRubberBandPoints->reset();
mDialog->hide();
QgsMapTool::deactivate();
}


void QgsMeasureTool::restart()
{
mPoints.clear();
Expand Down

0 comments on commit f28b634

Please sign in to comment.