From 593a03adf4435a78a1d1a771642364f51b9274dd Mon Sep 17 00:00:00 2001 From: abn Date: Wed, 12 Nov 2014 15:32:02 +0100 Subject: [PATCH] Fixing menu entries not appearing properly. --- src/PVGUI/PVGUI_Module.cxx | 6 ++---- src/PVGUI/PVGUI_Module_actions.cxx | 16 ++++++---------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index a62e2fc8..e97566a1 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -132,11 +132,9 @@ #include #include #include +#include -// TO REMOVE: -#include - -#include +//#include //---------------------------------------------------------------------------- diff --git a/src/PVGUI/PVGUI_Module_actions.cxx b/src/PVGUI/PVGUI_Module_actions.cxx index cf88c7d0..e41713e2 100644 --- a/src/PVGUI/PVGUI_Module_actions.cxx +++ b/src/PVGUI/PVGUI_Module_actions.cxx @@ -484,22 +484,18 @@ void PVGUI_Module::pvCreateMenus() // --- Menu "Sources" // Install ParaView managers for "Sources" menu QMenu* aRes = 0; - QMenu* filtersMenu = 0; PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desk); - mySourcesMenuId = createMenu( tr( "MEN_DESK_SOURCES" ), -1, -1, 60); - if ( (aRes = getMenu( mySourcesMenuId )) ) - pqParaViewMenuBuilders::buildSourcesMenu(*aRes, desk); + aRes = guiElements->getSourcesMenu(); + mySourcesMenuId = createMenu( tr( "MEN_DESK_SOURCES" ), -1, -1, 60, -1, aRes); // --- Menu "Filters" // Install ParaView managers for "Filters" menu - myFiltersMenuId = createMenu( tr( "MEN_DESK_FILTERS" ), -1, -1, 70 ); - if ( (filtersMenu = getMenu( myFiltersMenuId )) ) - pqParaViewMenuBuilders::buildFiltersMenu(*filtersMenu, desk); + aRes = guiElements->getFiltersMenu(); + myFiltersMenuId = createMenu( tr( "MEN_DESK_FILTERS" ), -1, -1, 70, -1, aRes); // --- Menu "Macros" - myMacrosMenuId = createMenu( tr( "MEN_MACROS" ), -1, -1, 80 ); - if ( (aRes = getMenu( myMacrosMenuId )) ) - pqParaViewMenuBuilders::buildMacrosMenu(*aRes); + aRes = guiElements->getMacrosMenu(); + myMacrosMenuId = createMenu( tr( "MEN_MACROS" ), -1, -1, 80, -1, aRes); // --- Menu "Tools" int aToolsMnu = createMenu( tr( "MEN_DESK_TOOLS" ), -1, -1, 90 ); -- 2.39.2