+// File: XGUI_OperationMgr.h
+// Created: 20 Apr 2014
+// Author: Natalia ERMOLAEVA
+
#include "XGUI_OperationMgr.h"
#include "ModuleBase_Operation.h"
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;
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());
}
}
if (aResultOp)
- startOperation(aResultOp);
+ resumeOperation(aResultOp);
}