From: vsv Date: Fri, 19 Jan 2018 13:09:57 +0000 (+0300) Subject: Optimization of mode remembering X-Git-Tag: V_3.0.0RC1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=198948c71ea9b2c74f8b066bd5f4373049070fe4;p=modules%2Fshaper.git Optimization of mode remembering --- 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;