From: vsr Date: Thu, 22 Jan 2015 07:34:25 +0000 (+0300) Subject: 0022847: [CEA 1408] Regression : in 7.5.1rc1 switching to Paravis to some other modul... X-Git-Tag: V7_5_1rc2^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6c57157645ffb6c745893e023349b3ecbd1b7463;p=modules%2Fparavis.git 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 --- 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);