From 44d447459becc9e2fc08985f89da5cb4bd7b9c33 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 29 Nov 2019 14:13:05 +0300 Subject: [PATCH] Issue #3101: Set property option for HideFaces panel using in operations. --- src/PartSet/PartSet_Module.cpp | 3 +++ src/XGUI/XGUI_Workshop.cpp | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 6103aa898..febeae273 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -252,6 +252,9 @@ PartSet_Module::PartSet_Module(ModuleBase_IWorkshop* theWshop) Config_PropManager::registerProp("Shortcuts", "add_parameter_shortcut", "Add parameter in parameters manager dialog", Config_Prop::Shortcut, "Ctrl+A"); + + Config_PropManager::registerProp("Windows", "use_hide_faces_panel", "Use HideFaces panel in operations", + Config_Prop::Boolean, "false"); } //****************************************************** diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 6a1766792..aa66b4896 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -774,9 +774,11 @@ void XGUI_Workshop::fillPropertyPanel(ModuleBase_Operation* theOperation) #endif myErrorMgr->setPropertyPanel(myPropertyPanel); - theOperation->setHideFacesVisible(myFacesPanel->isVisible()); - if (aFeatureInfo.get() && aFeatureInfo->isHideFacesPanel() && !myFacesPanel->isVisible()) - myFacesPanel->show(); + if (Config_PropManager::boolean("Windows", "use_hide_faces_panel")) { + theOperation->setHideFacesVisible(myFacesPanel->isVisible()); + if (aFeatureInfo.get() && aFeatureInfo->isHideFacesPanel() && !myFacesPanel->isVisible()) + myFacesPanel->show(); + } showPanel(myPropertyPanel); } @@ -860,8 +862,10 @@ void XGUI_Workshop::onOperationStopped(ModuleBase_Operation* theOperation) } activateObjectsSelection(anObjects); - if (!theOperation->isHideFacesVisible()) - myFacesPanel->hide(); + if (Config_PropManager::boolean("Windows", "use_hide_faces_panel")) { + if (!theOperation->isHideFacesVisible()) + myFacesPanel->hide(); + } } //****************************************************** -- 2.39.2