X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Selection.cxx;h=ab4a1ca8ec4d3d1f80aab645f8770fd9e97e2493;hb=d85d605175efca167efafe15543f2212e9702b1b;hp=d0cd5c4dcc54cb765f55e29623e09432d8606095;hpb=385d4cede5f752d0eec26c306f3b5e14511e2a3d;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index d0cd5c4dc..ab4a1ca8e 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -43,6 +43,8 @@ #include #include #include +#include +#include // IDL includes #include @@ -77,6 +79,8 @@ void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr if( mgr ) { + myOwners.clear(); + mgr->selected(myOwners, client); for( int i=0, n=count(); i= 0 && ind < myTypes.count()) { + if (isReference(ind)) { + SUIT_DataOwner* aOwn = myOwners.at(ind); + LightApp_DataOwner* sowner = dynamic_cast(aOwn); + QString aEntry = sowner->entry(); + _PTR(SObject) aSObject = SMESH::getStudy()->FindObjectID(aEntry.toStdString()); + _PTR(SObject) aFatherObj = aSObject->GetFather(); + _PTR(SComponent) aComponent = aFatherObj->GetFatherComponent(); + if (aComponent->ComponentDataType() == "SMESH") { + QString aObjEntry = entry(ind); + _PTR(SObject) aGeomSObject = SMESH::getStudy()->FindObjectID(aObjEntry.toStdString()); + GEOM::GEOM_Object_var aObject = SMESH::SObjectToInterface(aGeomSObject); + if (!aObject->_is_nil()) + return aObject->IsParametrical(); + } + } + } + return false; +} + //======================================================================= //function : isEditableHyp //purpose :