Skip to content

Commit

Permalink
Fix measure dialog shows wrong results when changing units
Browse files Browse the repository at this point in the history
If the measurement was not finished (ie right click occurred)
then the last length would be missing from the table

Fix #15433

(cherry-picked from 03bff50)
  • Loading branch information
nyalldawson committed Oct 6, 2016
1 parent 35ba4b3 commit d98d24b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgsmeasuredialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ void QgsMeasureDialog::unitsChanged( int index )
mTable->clear();
mTotal = 0.;
updateUi();

if ( !mTool->done() )
{
// re-add temporary mouse cursor position
addPoint( mLastMousePoint );
mouseMove( mLastMousePoint );
}
}

void QgsMeasureDialog::restart()
Expand Down

0 comments on commit d98d24b

Please sign in to comment.