From ee9dac2e71e9f488bf3a092ef351a7cf64b94140 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 27 Aug 2018 17:34:14 +0300 Subject: [PATCH] Issue #2582: Show/Hide inspection panel on activate/deactivate SHAPER module. --- src/SHAPERGUI/SHAPERGUI.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index ad2809535..9fe4223b1 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -207,6 +207,13 @@ bool SHAPERGUI::activateModule(SUIT_Study* theStudy) desktop()->tabifyDockWidget(aObjDoc, myWorkshop->propertyPanel()); } + DockWidget* aInspection = myWorkshop->inspectionPanel(); + if (aInspection) { + QAction* aViewAct = aInspection->toggleViewAction(); + aViewAct->setEnabled(true); + aInspection->setVisible(true); + } + if (!mySelector) { ViewManagerList OCCViewManagers; application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers); @@ -306,6 +313,12 @@ bool SHAPERGUI::deactivateModule(SUIT_Study* theStudy) QAction* aViewAct = aObjDoc->toggleViewAction(); aViewAct->setEnabled(false); } + DockWidget* aInspection = myWorkshop->inspectionPanel(); + if (aInspection) { + aInspection->setVisible(false); + QAction* aViewAct = aInspection->toggleViewAction(); + aViewAct->setEnabled(false); + } // the active operation should be stopped for the next activation. // There should not be active operation and visualized preview. -- 2.39.2