SUIT_MessageBox::Yes) == SUIT_MessageBox::Yes;
}
// Store modifications if needed
- if ( isToStore && !store( anErrorMsg ) ) {
- anErrorMsg.append( "\n" + tr( "INPUT_VALID_DATA" ) );
- SUIT_MessageBox::critical( module()->getApp()->desktop(),
- tr( "INSUFFICIENT_INPUT_DATA" ),
- anErrorMsg );
- return;
+ if ( isToStore )
+ {
+ startDocOperation();
+ if ( !store( anErrorMsg ) )
+ {
+ abortDocOperation();
+
+ anErrorMsg.append( "\n" + tr( "INPUT_VALID_DATA" ) );
+ SUIT_MessageBox::critical( module()->getApp()->desktop(),
+ tr( "INSUFFICIENT_INPUT_DATA" ),
+ anErrorMsg );
+ return;
+ }
+ else
+ {
+ commitDocOperation();
+ }
}
aPanel->setMode( theActualMode );
}
aModule->update( UF_Model | UF_OCCViewer | UF_OCC_Forced );
- commitDocOperation(); // TODO: analyze the consequences
return true;
}