From 2c18493b0341b6e255cd2381ef717e916ddc387a Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 8 Dec 2014 10:16:17 +0300 Subject: [PATCH] Issue #302: correctly abort sketch transaction --- src/Model/Model_Document.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 6c817c4b3..62b157e04 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -338,8 +338,9 @@ void Model_Document::abortOperation() { if (myNestedNum > 0 && !myDoc->HasOpenCommand()) { // abort all what was done in nested // first compact all nested - compactNested(); - myDoc->Undo(); + if (compactNested()) { + myDoc->Undo(); // undo only compacted, if not: do not undo the empty transaction + } myDoc->ClearRedos(); myTransactionsAfterSave--; myIsEmptyTr.erase(myTransactionsAfterSave); -- 2.39.2