From 04795e4b90883cc9259d904e49c605aad63f3eaa Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 7 Nov 2014 16:52:48 +0300 Subject: [PATCH] Issue #245: Hide extra items from pop-up menu in SALOME --- src/NewGeom/NewGeom_Module.cpp | 13 ++++++++++--- src/NewGeom/NewGeom_Module.h | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 6bb769fda..d1a639543 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -70,7 +70,7 @@ private: //****************************************************** NewGeom_Module::NewGeom_Module() : LightApp_Module("NewGeom"), - mySelector(0), myIsOpened(0) + mySelector(0), myIsOpened(0), myPopupMgr(0) { myWorkshop = new XGUI_Workshop(this); myProxyViewer = new NewGeom_SalomeViewer(this); @@ -131,8 +131,7 @@ bool NewGeom_Module::activateModule(SUIT_Study* theStudy) mySelector = createSelector(OCCViewManagers.first()); } } - QtxPopupMgr* aMgr = popupMgr(); // Create popup manager - action(myEraseAll)->setEnabled(false); + //action(myEraseAll)->setEnabled(false); if (myIsOpened) { myWorkshop->objectBrowser()->rebuildDataTree(); @@ -202,6 +201,14 @@ void NewGeom_Module::onViewManagerAdded(SUIT_ViewManager* theMgr) } } +//****************************************************** +QtxPopupMgr* NewGeom_Module::popupMgr() +{ + if (!myPopupMgr) + myPopupMgr = new QtxPopupMgr( 0, this ); + return myPopupMgr; +} + //****************************************************** void NewGeom_Module::onDefaultPreferences() { diff --git a/src/NewGeom/NewGeom_Module.h b/src/NewGeom/NewGeom_Module.h index 11a2e1035..4b970e1ac 100644 --- a/src/NewGeom/NewGeom_Module.h +++ b/src/NewGeom/NewGeom_Module.h @@ -97,6 +97,7 @@ Q_OBJECT protected: CAM_DataModel* createDataModel(); + virtual QtxPopupMgr* popupMgr(); private: NewGeom_OCCSelector* createSelector(SUIT_ViewManager* theMgr); @@ -115,6 +116,7 @@ Q_OBJECT bool myIsOpened; bool myIsStorePositions; + QtxPopupMgr* myPopupMgr; }; #endif -- 2.39.2