From b6bea82aa0764e098fd8a7ca9105fe1fd4baac91 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 6 Oct 2016 18:13:56 +0300 Subject: [PATCH] IPAL53692: Display Entity menu item is available for groups and sub-meshes --- src/SMESHGUI/SMESHGUI.cxx | 4 ++-- src/SMESHGUI/SMESHGUI_Selection.cxx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index bda271418..1803c634d 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -4380,7 +4380,7 @@ void SMESHGUI::initialize( CAM_Application* app ) isNotEmpty("numberOfNodes <> 0"), // has nodes, edges, etc in VISIBLE! actor - hasNodes("(numberOfNodes > 0 )"),//&& isVisible)"), + hasNodes("(numberOfNodes > 0 ) && hasActor"), hasElems("(count( elemTypes ) > 0)"), hasDifferentElems("(count( elemTypes ) > 1)"), hasBalls("({'BallElem'} in elemTypes)"), @@ -4532,7 +4532,7 @@ void SMESHGUI::initialize( CAM_Application* app ) popupMgr()->insert( separator(), anId, -1 ); popupMgr()->insert( action( SMESHOp::OpDEChoose ), anId, -1 ); - popupMgr()->setRule( action( SMESHOp::OpDEChoose ), aClient + "&&" + aType + "&&" + isNotEmpty, QtxPopupMgr::VisibleRule ); + popupMgr()->setRule( action( SMESHOp::OpDEChoose ), aClient + "&& $type in {" + mesh + "} &&" + isNotEmpty, QtxPopupMgr::VisibleRule ); popupMgr()->insert( separator(), anId, -1 ); diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 832c51ec1..757238eab 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -118,6 +118,7 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const QVariant val; if ( p=="client" ) val = QVariant( LightApp_Selection::parameter( p ) ); else if ( p=="type" ) val = QVariant( myTypes[ind] ); + else if ( p=="hasActor" ) val = QVariant( getActor( ind ) != 0 ); else if ( p=="elemTypes" ) val = QVariant( elemTypes( ind ) ); else if ( p=="isAutoColor" ) val = QVariant( isAutoColor( ind ) ); else if ( p=="numberOfNodes" ) val = QVariant( numberOfNodes( ind ) );