Salome HOME
Code alignment.
[modules/hydro.git] / 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 )