{
}
+void HYDROGUI_Operation::startDocOperation()
+{
+ // Open transaction in the model document
+ doc()->StartOperation();
+}
+
+void HYDROGUI_Operation::abortDocOperation()
+{
+ // Abort transaction in the model document
+ doc()->AbortOperation();
+}
+
+void HYDROGUI_Operation::commitDocOperation()
+{
+ // Commit transaction in the model document
+ doc()->CommitOperation( HYDROGUI_Tool::ToExtString( getName() ) );
+}
+
Handle_HYDROData_Document HYDROGUI_Operation::doc() const
{
return HYDROData_Document::Document( myModule->getStudyId() );
{
QApplication::setOverrideCursor( Qt::WaitCursor );
- // Open transaction in the model document
- doc()->StartOperation();
+ startDocOperation();
int anUpdateFlags = 0;
QString anErrorMsg;
if ( aResult )
{
module()->update( anUpdateFlags );
-
- // Commit transaction in the model document
- doc()->CommitOperation( HYDROGUI_Tool::ToExtString( getName() ) );
+ commitDocOperation();
commit();
}
else
{
- // Abort transaction in the model document
- doc()->AbortOperation();
-
+ abortDocOperation();
QString aMsg = tr( "INPUT_VALID_DATA" );
if( !anErrorMsg.isEmpty() )
aMsg.prepend( anErrorMsg + "\n" );