]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Debug of abort-updates
authormpv <mpv@opencascade.com>
Tue, 18 Aug 2015 09:00:56 +0000 (12:00 +0300)
committermpv <mpv@opencascade.com>
Tue, 18 Aug 2015 09:00:56 +0000 (12:00 +0300)
src/Model/Model_Document.cpp

index 3a2cb0d2c77fb9c4770fb0ca1dfb687cedf12a72..d91389b3ed623237139ce6b4dd9d66c416143502 100644 (file)
@@ -427,7 +427,12 @@ void Model_Document::abortOperation()
     if (!myNestedNum.empty())
       (*myNestedNum.rbegin())--;
     // roll back the needed number of transactions
-    myDoc->AbortCommand();
+    // make commit/undo to get the modification delta
+    //myDoc->AbortCommand();
+    if (myDoc->CommitCommand()) {
+      modifiedLabels(myDoc, aDeltaLabels);
+      myDoc->Undo();
+    }
     for(int a = 0; a < aNumTransactions; a++) {
       modifiedLabels(myDoc, aDeltaLabels);
       myDoc->Undo();