Skip to content

Commit f28b634

Browse files
committed
allow reactivation of measurement after deactivation
1 parent b3d19d6 commit f28b634

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/app/qgsmeasuretool.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
4646
mPoints.append( QgsPoint( 0, 0 ) );
4747

4848
mDialog = new QgsMeasureDialog( this, Qt::WindowStaysOnTopHint );
49+
mDialog->restorePosition();
4950
mSnapper.setMapCanvas( canvas );
5051

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

6970
void QgsMeasureTool::activate()
7071
{
71-
mDialog->restorePosition();
72+
mDialog->show();
7273
QgsMapTool::activate();
7374

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

9697
void QgsMeasureTool::deactivate()
9798
{
98-
mDialog->close();
99-
mRubberBand->reset();
100-
mRubberBandPoints->reset();
99+
mDialog->hide();
101100
QgsMapTool::deactivate();
102101
}
103102

104-
105103
void QgsMeasureTool::restart()
106104
{
107105
mPoints.clear();

0 commit comments

Comments
 (0)