From: mpv Date: Mon, 8 Dec 2014 07:16:17 +0000 (+0300) Subject: Issue #302: correctly abort sketch transaction X-Git-Tag: V_0.6.0^2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2c18493b0341b6e255cd2381ef717e916ddc387a;p=modules%2Fshaper.git Issue #302: correctly abort sketch transaction --- 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);