Skip to content

Commit

Permalink
Measure Tool: Recalculate area when measure polygon drawing finishes
Browse files Browse the repository at this point in the history
Fix #31134
  • Loading branch information
m-kuhn committed Aug 7, 2019
1 parent 0ea4dfd commit 31f0b1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/qgsmeasuredialog.cpp
Expand Up @@ -267,7 +267,8 @@ void QgsMeasureDialog::removeLastPoint()
if ( numPoints > 1 )
{
QVector<QgsPointXY> tmpPoints = mTool->points();
tmpPoints.append( mLastMousePoint );
if ( !mTool->done() )
tmpPoints.append( mLastMousePoint );
double area = mDa.measurePolygon( tmpPoints );
editTotal->setText( formatArea( area ) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmeasuredialog.h
Expand Up @@ -49,7 +49,7 @@ class APP_EXPORT QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase
//! Mose move
void mouseMove( const QgsPointXY &point );

//! Remove last point
//! Removes the last point
void removeLastPoint();

public slots:
Expand Down

0 comments on commit 31f0b1f

Please sign in to comment.