]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #408: clear undo in any case and in sub-documents on finish operation
authormpv <mpv@opencascade.com>
Fri, 17 Apr 2015 16:47:40 +0000 (19:47 +0300)
committermpv <mpv@opencascade.com>
Fri, 17 Apr 2015 16:47:40 +0000 (19:47 +0300)
src/Model/Model_Document.cpp

index c471c2a7119e238f515408632d5b74aedb4773ae..836e289b2433e06499cf6ebd4b2a7b7da8dce0b1 100644 (file)
@@ -382,9 +382,13 @@ bool Model_Document::finishOperation()
     // nothing inside in all documents, so remove this transaction from the transactions list
     undoInternal(true, false);
   }
-  // on finish clear redos in any case (issue 446)
+  // on finish clear redos in any case (issue 446) and for all subs (issue 408)
   myDoc->ClearRedos();
   myRedos.clear();
+  for (aSubIter = aSubs.begin(); aSubIter != aSubs.end(); aSubIter++) {
+    subDoc(*aSubIter)->myDoc->ClearRedos();
+    subDoc(*aSubIter)->myRedos.clear();
+  }
 
   return aResult;
 }