- ModuleBase_Operation* anOperation = currentOperation();
- if (anOperation && anOperation->isModified()) {
- int anAnswer = QMessageBox::question(
- qApp->activeWindow(), tr("Cancel operation"),
- tr("Operation %1 will be cancelled. Continue?").arg(anOperation->id()), QMessageBox::Yes,
- QMessageBox::No);
- return anAnswer == QMessageBox::Yes;
- }
- return true;
+ ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+
+ bool isNestedOk = (myOperations.count() >= 1) &&
+ myOperations.at(0)->isValid();
+ emit nestedStateChanged(isNestedOk);
+ emit operationStarted(aSenderOperation);
+}
+
+void XGUI_OperationMgr::onOperationAborted()
+{
+ ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+ emit operationAborted(aSenderOperation);
+}
+
+void XGUI_OperationMgr::onOperationCommitted()
+{
+ ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+ emit nestedStateChanged(myOperations.count() >= 1);
+ emit operationCommitted(aSenderOperation);
+}
+
+void XGUI_OperationMgr::onOperationResumed()
+{
+ ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+ emit operationResumed(aSenderOperation);