]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_OperationMgr.cpp
Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / XGUI / XGUI_OperationMgr.cpp
index bca019e31da01b8eea4ad02e56cd8d7a0e266416..5661727c2cf8e14d3aa75c069b1d319b02701ac3 100644 (file)
@@ -1,3 +1,7 @@
+// File:        XGUI_OperationMgr.h
+// Created:     20 Apr 2014
+// Author:      Natalia ERMOLAEVA
+
 #include "XGUI_OperationMgr.h"
 
 #include "ModuleBase_Operation.h"
@@ -32,6 +36,14 @@ bool XGUI_OperationMgr::startOperation(ModuleBase_Operation* theOperation)
   return true;
 }
 
+void XGUI_OperationMgr::resumeOperation(ModuleBase_Operation* theOperation)
+{
+  connect(theOperation, SIGNAL(stopped()), this, SLOT(onOperationStopped()));
+  connect(theOperation, SIGNAL(started()), this, SIGNAL(operationStarted()));
+
+  theOperation->resume();
+}
+
 bool XGUI_OperationMgr::canStartOperation(ModuleBase_Operation* theOperation)
 {
   bool aCanStart = true;
@@ -49,15 +61,6 @@ bool XGUI_OperationMgr::canStartOperation(ModuleBase_Operation* theOperation)
   return aCanStart;
 }
 
-void XGUI_OperationMgr::commitCurrentOperation()
-{
-  ModuleBase_Operation* anOperation = currentOperation();
-  if (!anOperation)
-    return;
-
-  anOperation->commit();
-}
-
 void XGUI_OperationMgr::onOperationStopped()
 {
   ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
@@ -83,5 +86,5 @@ void XGUI_OperationMgr::onOperationStopped()
     }
   }
   if (aResultOp)
-    startOperation(aResultOp);
+    resumeOperation(aResultOp);
 }