From 198948c71ea9b2c74f8b066bd5f4373049070fe4 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 19 Jan 2018 16:09:57 +0300 Subject: [PATCH] Optimization of mode remembering --- src/ModuleBase/ModuleBase_Operation.cpp | 4 ++++ src/XGUI/XGUI_OperationMgr.cpp | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index fc474be1d..91be0c34c 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -133,6 +133,10 @@ void ModuleBase_Operation::abort() bool ModuleBase_Operation::commit() { if (canBeCommitted()) { + ModuleBase_IPropertyPanel* aPanel = propertyPanel(); + if (aPanel) + aPanel->onAcceptData(); + SessionPtr aMgr = ModelAPI_Session::get(); commitOperation(); diff --git a/src/XGUI/XGUI_OperationMgr.cpp b/src/XGUI/XGUI_OperationMgr.cpp index 7e2aee8bb..3eae6f22d 100644 --- a/src/XGUI/XGUI_OperationMgr.cpp +++ b/src/XGUI/XGUI_OperationMgr.cpp @@ -434,11 +434,6 @@ void XGUI_OperationMgr::stopOperation(ModuleBase_Operation* theOperation, bool& { if (XGUI_Tools::workshop(myWorkshop)->errorMgr()->isApplyEnabled() && theOperation->isModified()) { - ModuleBase_IPropertyPanel* aPanel = theOperation->propertyPanel(); - if (aPanel) { - XGUI_PropertyPanel* aPP = dynamic_cast(aPanel); - aPP->onAcceptData(); - } isCommitted = theOperation->commit(); } else { isCommitted = false; -- 2.39.2