From: vsv Date: Fri, 7 Nov 2014 13:52:48 +0000 (+0300) Subject: Issue #245: Hide extra items from pop-up menu in SALOME X-Git-Tag: V_0.5~16^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=04795e4b90883cc9259d904e49c605aad63f3eaa;p=modules%2Fshaper.git Issue #245: Hide extra items from pop-up menu in SALOME --- 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