X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Selection.cxx;h=ab4a1ca8ec4d3d1f80aab645f8770fd9e97e2493;hb=d85d605175efca167efafe15543f2212e9702b1b;hp=fbc43c922d46b397ad32b2e0236898043b67c281;hpb=ec2b6eb2fb72bce2449d1c0eeb24ad157e571eab;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index fbc43c922..ab4a1ca8e 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -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 :