From 6c57157645ffb6c745893e023349b3ecbd1b7463 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 22 Jan 2015 10:34:25 +0300 Subject: [PATCH] 0022847: [CEA 1408] Regression : in 7.5.1rc1 switching to Paravis to some other modules keeps the Paravis toolbars visible - Additional fix, to properly manage "Common" and "DataAnalysis" toolbars created by PVViewer --- src/PVGUI/PVGUI_Module.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index 9cc23a3a..1d5d69db 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -426,9 +426,21 @@ void PVGUI_Module::initialize( CAM_Application* app ) // Find created toolbars QCoreApplication::processEvents(); + // process PVViewer toolbars (might be added by PVViewer created BEFORE activating ParaVis) + QList pvToolbars = myGuiElements->getToolbars(); + foreach(QToolBar* aBar, pvToolbars) { + if (!myToolbars.contains(aBar)) { + myToolbars[aBar] = true; + myToolbarBreaks[aBar] = false; + aBar->setVisible(false); + aBar->toggleViewAction()->setVisible(false); + } + } + + // process other toolbars (possibly added by Paraview) QList allToolbars = aDesktop->findChildren(); foreach(QToolBar* aBar, allToolbars) { - if (!foreignToolbars.contains(aBar)) { + if (!foreignToolbars.contains(aBar) && !myToolbars.contains(aBar)) { myToolbars[aBar] = true; myToolbarBreaks[aBar] = false; aBar->setVisible(false); -- 2.39.2