From 6fa26732127573e0dbf31983272fa577ee047632 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 14 Jan 2015 15:00:24 +0300 Subject: [PATCH] Issue #231 Deletion of a feature --- src/XGUI/XGUI_ContextMenuMgr.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- 2.39.2