X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNewGeom%2FNewGeom_Module.cpp;h=fc07f5d55bf7f280db540e4aed232fa1fc4e5585;hb=2b4f4bf278c841500eb29bb5d204690427b0d56b;hp=549276279f14ece914747ce0b52deb231b7a3dce;hpb=98d902a1056a3476a50af26142b367cfd45d3cc9;p=modules%2Fshaper.git diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 549276279..fc07f5d55 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -16,6 +17,7 @@ #include #include +#include #include #include @@ -72,7 +74,6 @@ bool NewGeom_Module::activateModule(SUIT_Study* theStudy) if (isDone) { setMenuShown( true ); setToolShown( true ); - myWorkshop->propertyPanel()->hide(); if (!mySelector) { ViewManagerList OCCViewManagers; @@ -81,10 +82,22 @@ bool NewGeom_Module::activateModule(SUIT_Study* theStudy) mySelector = createSelector(OCCViewManagers.first()); } } + myWorkshop->propertyPanel()->hide(); + QtxPopupMgr* aMgr = popupMgr(); // Create popup manager + action(myEraseAll)->setEnabled(false); } return isDone; } +//****************************************************** +bool NewGeom_Module::deactivateModule(SUIT_Study* theStudy) +{ + setMenuShown( false ); + setToolShown( false ); + //myWorkshop->contextMenuMgr()->disconnectViewer(); + return LightApp_Module::deactivateModule(theStudy); +} + //****************************************************** void NewGeom_Module::onViewManagerAdded( SUIT_ViewManager* theMgr ) { @@ -112,14 +125,6 @@ NewGeom_OCCSelector* NewGeom_Module::createSelector(SUIT_ViewManager* theMgr) return 0; } -//****************************************************** -bool NewGeom_Module::deactivateModule(SUIT_Study* theStudy) -{ - setMenuShown( false ); - setToolShown( false ); - return LightApp_Module::deactivateModule(theStudy); -} - //****************************************************** CAM_DataModel* NewGeom_Module::createDataModel() { @@ -242,3 +247,10 @@ void NewGeom_Module::selectionChanged() LightApp_Module::selectionChanged(); myWorkshop->salomeViewerSelectionChanged(); } + +//****************************************************** +void NewGeom_Module::contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle) +{ + myWorkshop->contextMenuMgr()->addViewerItems(theMenu); + LightApp_Module::contextMenuPopup(theClient, theMenu, theTitle); +} \ No newline at end of file