diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 48929e63..fd3bb6da 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -628,6 +628,11 @@ bool UBGraphicsScene::inputDeviceRelease() setDocumentUpdated(); + if (mCurrentStroke && mCurrentStroke->polygons().empty()){ + delete mCurrentStroke; + } + mCurrentStroke = NULL; + return accepted; }