From: nds Date: Wed, 14 Jan 2015 12:00:24 +0000 (+0300) Subject: Issue #231 Deletion of a feature X-Git-Tag: V_1.0.0~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6fa26732127573e0dbf31983272fa577ee047632;p=modules%2Fshaper.git Issue #231 Deletion of a feature --- diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index dcde2a6b5..8a794d781 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -243,6 +243,24 @@ void XGUI_ContextMenuMgr::addViewerItems(QMenu* theMenu) const aSubMenu->addActions(aMDI->actions()); } } + + aObjects.clear(); + aObjects = aSelMgr->selection()->selectedPresentations(); + if (aObjects.size() > 0) { + bool hasFeature = true;//false; + foreach(ObjectPtr aObject, aObjects) + { + ResultPtr aRes = std::dynamic_pointer_cast(aObject); + if (aRes) { + hasFeature = true; + } + //FeaturePtr aFeature = std::dynamic_pointer_cast(aObject); + //if (aFeature) + // hasFeature = true; + } + if (hasFeature) + theMenu->addAction(action("DELETE_CMD")); + } } void XGUI_ContextMenuMgr::connectObjectBrowser() const