]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Optimization of mode remembering
authorvsv <vsv@opencascade.com>
Fri, 19 Jan 2018 13:09:57 +0000 (16:09 +0300)
committervsv <vsv@opencascade.com>
Fri, 19 Jan 2018 13:10:16 +0000 (16:10 +0300)
src/ModuleBase/ModuleBase_Operation.cpp
src/XGUI/XGUI_OperationMgr.cpp

index fc474be1d7175d3ec8c3be471fc64d79e35e3582..91be0c34cb2221b98cd5ea8aab98fcd1509288ea 100644 (file)
@@ -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();
index 7e2aee8bb00a89c641da71e04f614058f798ea13..3eae6f22de01fa2900222cede3f07a047f2b41dd 100644 (file)
@@ -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<XGUI_PropertyPanel*>(aPanel);
-      aPP->onAcceptData();
-    }
     isCommitted = theOperation->commit();
   } else {
     isCommitted = false;