From: ouv Date: Fri, 9 Aug 2013 12:04:38 +0000 (+0000) Subject: Possibility to undo empty transactions. X-Git-Tag: BR_hydro_v_0_1~122 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2bb2a74d3111ae2f2eea10996c7e2b923b18d7cb;p=modules%2Fhydro.git Possibility to undo empty transactions. --- diff --git a/src/HYDROData/HYDROData_Document.cxx b/src/HYDROData/HYDROData_Document.cxx index 6062fd6d..bfc30b84 100644 --- a/src/HYDROData/HYDROData_Document.cxx +++ b/src/HYDROData/HYDROData_Document.cxx @@ -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 )