]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Avoid calling FinishOperation() when operation is just started.
authorvsr <vsr@opencascade.com>
Wed, 18 Jun 2014 09:38:23 +0000 (13:38 +0400)
committervsr <vsr@opencascade.com>
Wed, 18 Jun 2014 09:38:23 +0000 (13:38 +0400)
src/GEOMBase/GEOM_Operation.cxx

index 1ecd8888d92def0d04086334ca7b1350389e4596..614868aebee8c48a007bb47040038565ae0f789f 100644 (file)
@@ -59,6 +59,7 @@ void GEOM_Operation::startOperation()
   if ( !myIOperation->_is_nil() ) {
     try {
       myIOperation->StartOperation();
+      setState( Running );
     }
     catch ( const SALOME::SALOME_Exception& e ) {
       SalomeApp_Tools:: QtCatchCorbaException( e );
@@ -74,9 +75,13 @@ void GEOM_Operation::commitOperation()
 {
   SUIT_Operation::commitOperation();
 
+  if ( state() != Running )
+    return;
+  
   if ( !myIOperation->_is_nil() ) {
     try {
       myIOperation->FinishOperation();
+      setState( Waiting );
     }
     catch ( const SALOME::SALOME_Exception& e ) {
       SalomeApp_Tools:: QtCatchCorbaException( e );