+void XGUI_OperationMgr::onBeforeOperationAborted()
+{
+ onBeforeOperationCommitted();
+}
+
+void XGUI_OperationMgr::onOperationAborted()
+{
+ ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+ emit operationAborted(aSenderOperation);
+}
+
+void XGUI_OperationMgr::onBeforeOperationCommitted()
+{
+ ModuleBase_Operation* aCurrentOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+ if (!aCurrentOperation)
+ return;
+
+ /// Restore the previous current feature
+ ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(aCurrentOperation);
+ if (aFOperation) {
+ if (aFOperation->isEditOperation()) {
+ /// Restore the previous current feature
+ setCurrentFeature(aFOperation->previousCurrentFeature());
+ }
+ else { // create operation
+ // the Top created feature should stays the current. In nested operations, like Line in the Sketch or
+ // Sketch in ExtrusionCut, a previous feature should be restored on commit. It is performed here
+ // in order to perform it in the current transaction without opening a new one.
+ if (myOperations.front() != aFOperation)
+ setCurrentFeature(aFOperation->previousCurrentFeature());
+ }
+ }
+}
+
+void XGUI_OperationMgr::onOperationCommitted()
+{
+ // apply state for all features from the stack of operations should be updated
+ updateApplyOfOperations();
+
+ ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+ emit operationCommitted(aSenderOperation);
+}
+
+void XGUI_OperationMgr::onOperationResumed()
+{
+ ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
+ emit operationResumed(aSenderOperation);
+}
+