Skip to content
Permalink
Browse files

allow reactivation of measurement after deactivation

  • Loading branch information
jef-n committed Aug 27, 2014
1 parent b3d19d6 commit f28b63497d458a50c9e3c604229229d6138c8bf0
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/app/qgsmeasuretool.cpp
@@ -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() ),
@@ -68,7 +69,7 @@ const QList<QgsPoint>& QgsMeasureTool::points()

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

// ensure that we have correct settings
@@ -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();

0 comments on commit f28b634

Please sign in to comment.
You can’t perform that action at this time.