]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Possibility to undo empty transactions.
authorouv <ouv@opencascade.com>
Fri, 9 Aug 2013 12:04:38 +0000 (12:04 +0000)
committerouv <ouv@opencascade.com>
Fri, 9 Aug 2013 12:04:38 +0000 (12:04 +0000)
src/HYDROData/HYDROData_Document.cxx

index 6062fd6dd88655935fc3872654650a526501c5c0..bfc30b84ba90d77b320a9068f3e17ab53af411ba 100644 (file)
@@ -133,7 +133,12 @@ void HYDROData_Document::StartOperation()
 
 void HYDROData_Document::CommitOperation(const TCollection_ExtendedString& theName)
 {
-  myDoc->CommitCommand();
+  if( !myDoc->CommitCommand() ) // it means that there were no modifications done
+  {
+    myDoc->NewCommand();
+    NewID(); // workaround: do something just to modify the document
+    myDoc->CommitCommand();
+  }
   myTransactionsAfterSave++;
 
   if( theName.Length() != 0 )