Skip to content

Commit

Permalink
correctly undo and clean
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 28, 2022
1 parent 9510498 commit bef73cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/maptools/qgsmaptoolshapeabstract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ void QgsMapToolShapeAbstract::clean()

void QgsMapToolShapeAbstract::undo()
{
if ( mPoints.count() > 1 )
if ( mPoints.count() > 0 )
mPoints.removeLast();
}
3 changes: 3 additions & 0 deletions src/gui/qgsmaptoolcapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,9 @@ void QgsMapToolCapture::deleteTempRubberBand()
void QgsMapToolCapture::clean()
{
stopCapturing();
if ( mCurrentCaptureTechnique == Shape && mCurrentShapeMapTool )
mCurrentShapeMapTool->clean();

clearCurve();
}

Expand Down

0 comments on commit bef73cd

Please sign in to comment.