From: abn Date: Tue, 4 Nov 2014 09:14:47 +0000 (+0100) Subject: Fixing filter display issues. X-Git-Tag: V7_5_0rc1~3^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=72197a261d1f8668a22f4d448e2864d70eba987c;p=modules%2Fparavis.git Fixing filter display issues. --- diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index b94515ef..a62e2fc8 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -350,9 +350,7 @@ void PVGUI_Module::initialize( CAM_Application* app ) { LightApp_Module::initialize( app ); - // Create ParaViS actions createActions(); - // Create ParaViS menus createMenus(); // Uncomment to debug ParaView initialization @@ -375,19 +373,17 @@ void PVGUI_Module::initialize( CAM_Application* app ) // Remember current state of desktop toolbars QList foreignToolbars = aDesktop->findChildren(); + // [ABN]: careful with the order of the GUI element creation, the loading of the configuration + // and the connection to the server. This order is very sensitive if one wants to make + // sure all menus, etc ... are correctly populated. + // Reference points are: ParaViewMainWindow.cxx and branded_paraview_initializer.cxx.in setupDockWidgets(); - // Behaviors and connection must be instanciated *after* widgets are in place - // In PARAVIS module we do not wait for PVViewer_ViewWindow to be instanciated to have this: - PVViewer_ViewManager::ParaviewInitBehaviors(true, aDesktop); - pvCreateActions(); pvCreateMenus(); pvCreateToolBars(); - // Connect after toolbar creation, etc ... as some activations of the toolbars is triggered - // by the ServerConnection event: - PVViewer_ViewManager::ConnectToExternalPVServer(aDesktop); + PVViewer_ViewManager::ParaviewInitBehaviors(true, aDesktop); QList activeDocks = aDesktop->findChildren(); QList activeMenus = aDesktop->findChildren(); @@ -419,7 +415,10 @@ void PVGUI_Module::initialize( CAM_Application* app ) // } // } - PVViewer_ViewManager::ParaviewLoadConfigurations(); + // Connect after toolbar creation, etc ... as some activations of the toolbars is triggered + // by the ServerConnection event: + PVViewer_ViewManager::ParaviewLoadConfigurations(true); + PVViewer_ViewManager::ConnectToExternalPVServer(aDesktop); updateObjBrowser(); // Find created toolbars diff --git a/src/PVGUI/PVGUI_Module_actions.cxx b/src/PVGUI/PVGUI_Module_actions.cxx index 303d4ff7..cf88c7d0 100644 --- a/src/PVGUI/PVGUI_Module_actions.cxx +++ b/src/PVGUI/PVGUI_Module_actions.cxx @@ -541,19 +541,19 @@ void PVGUI_Module::pvCreateMenus() pqPipelineBrowserWidget * pq = guiElements->getPipelineBrowserWidget(); pqParaViewMenuBuilders::buildPipelineBrowserContextMenu( *pq ); - // Reload configuration to populate dynamic menus from ParaView: - PVViewer_ViewManager::ParaviewLoadConfigurations(true); - - // Disable all filters for now (for some weird reasons they are all on when starting?) - QList sub_menus = filtersMenu->findChildren(); - foreach(QMenu * m, sub_menus) - { - QList act_list = m->actions(); - foreach(QAction * a, act_list) - { - a->setEnabled(false); - } - } +// // Reload configuration to populate dynamic menus from ParaView: +// PVViewer_ViewManager::ParaviewLoadConfigurations(true); +// +// // Disable all filters for now (for some weird reasons they are all on when starting?) +// QList sub_menus = filtersMenu->findChildren(); +// foreach(QMenu * m, sub_menus) +// { +// QList act_list = m->actions(); +// foreach(QAction * a, act_list) +// { +// a->setEnabled(false); +// } +// } } /*!