]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #245: Hide extra items from pop-up menu in SALOME
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 7 Nov 2014 13:52:48 +0000 (16:52 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 7 Nov 2014 13:52:48 +0000 (16:52 +0300)
src/NewGeom/NewGeom_Module.cpp
src/NewGeom/NewGeom_Module.h

index 6bb769fdafa20b1bfe402eca040e8418232c6361..d1a639543bef99eabe6e237100890ac538230d6b 100644 (file)
@@ -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()
 {
index 11a2e10355d209d230d91c66fc519d26a77c8779..4b970e1ac6379473357a2c4ac0b694be26205c29 100644 (file)
@@ -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