]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Improve deactivateModule() method: all started operations should be aborted
authorvsr <vsr@opencascade.com>
Tue, 13 Dec 2005 15:09:59 +0000 (15:09 +0000)
committervsr <vsr@opencascade.com>
Tue, 13 Dec 2005 15:09:59 +0000 (15:09 +0000)
src/LightApp/LightApp_Module.cxx

index 46d3f82afbba36a87b47afa7317d9a1e08445b21..283c49c89f7ebcf26dde76f788fef76ecbf1ec0f 100644 (file)
@@ -121,12 +121,18 @@ bool LightApp_Module::activateModule( SUIT_Study* study )
 }
 
 /*!Deactivate module.*/
-bool LightApp_Module::deactivateModule( SUIT_Study* )
+bool LightApp_Module::deactivateModule( SUIT_Study* study )
 {
   delete mySwitchOp;
   mySwitchOp = 0;
 
-  return true;
+  // abort all operations
+  MapOfOperation::const_iterator anIt;
+  for( anIt = myOperations.begin(); anIt != myOperations.end(); anIt++ ) {
+    anIt.data()->abort();
+  }
+
+  return CAM_Module::activateModule( study );
 }
 
 /*!NOT IMPLEMENTED*/