From: vsr Date: Wed, 18 Jun 2014 09:38:23 +0000 (+0400) Subject: Avoid calling FinishOperation() when operation is just started. X-Git-Tag: V7_5_0a1~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=23318a595c6902857eec87185e9980dd41f4c2ad;p=modules%2Fgeom.git Avoid calling FinishOperation() when operation is just started. --- diff --git a/src/GEOMBase/GEOM_Operation.cxx b/src/GEOMBase/GEOM_Operation.cxx index 1ecd8888d..614868aeb 100644 --- a/src/GEOMBase/GEOM_Operation.cxx +++ b/src/GEOMBase/GEOM_Operation.cxx @@ -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 );