correctly undo and clean

This commit is contained in:
Denis Rouzaud 2022-01-14 09:38:42 +01:00
parent 9510498223
commit bef73cd091
2 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,6 @@ void QgsMapToolShapeAbstract::clean()
void QgsMapToolShapeAbstract::undo()
{
if ( mPoints.count() > 1 )
if ( mPoints.count() > 0 )
mPoints.removeLast();
}

View File

@ -984,6 +984,9 @@ void QgsMapToolCapture::deleteTempRubberBand()
void QgsMapToolCapture::clean()
{
stopCapturing();
if ( mCurrentCaptureTechnique == Shape && mCurrentShapeMapTool )
mCurrentShapeMapTool->clean();
clearCurve();
}