- myCurrentLineEdit = 0;
- myTypeGroup->setButton(aType);
- myElements->clear();
- setSelectionMode(aType);
- myTypeId = aType;
-
- myIdList.clear();
- if (!theGroup->IsEmpty()) {
- SMESH::long_array_var anElements = myGroup->GetListOfID();
- int k = anElements->length();
- for (int i = 0; i < k; i++) {
- myIdList.append(anElements[i]);
- myElements->insertItem(QString::number(anElements[i]));
+ myActor = SMESH::FindActorByObject(myMesh);
+ if ( !myActor )
+ myActor = SMESH::FindActorByObject(myGroup);
+ SMESH::SetPickable(myActor);
+
+ myCurrentLineEdit = 0;
+ myElements->clear();
+ setSelectionMode(aType);
+ myTypeId = aType;
+
+ myIdList.clear();
+ if (!myGroup->IsEmpty()) {
+ SMESH::long_array_var anElements = myGroup->GetListOfID();
+ int k = anElements->length();
+ for (int i = 0; i < k; i++) {
+ myIdList.append(anElements[i]);
+ myElements->insertItem(QString::number(anElements[i]));
+ }
+ myElements->selectAll(true);
+ }
+ }
+ else
+ {
+ myGroupOnGeom = SMESH::SMESH_GroupOnGeom::_narrow( theGroup );
+
+ if ( !myGroupOnGeom->_is_nil() )
+ {
+ myGrpTypeGroup->setButton(1);
+ onGrpTypeChanged(1);
+
+ myActor = SMESH::FindActorByObject(myMesh);
+ if ( !myActor )
+ myActor = SMESH::FindActorByObject(myGroup);
+ SMESH::SetPickable(myActor);
+
+ QString aShapeName("");
+ _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+ GEOM::GEOM_Object_var aGroupShape = myGroupOnGeom->GetShape();
+ if (!aGroupShape->_is_nil())
+ {
+ _PTR(SObject) aGroupShapeSO = aStudy->FindObjectID(aGroupShape->GetStudyEntry());
+ aShapeName = aGroupShapeSO->GetName().c_str();
+ }
+ myGeomGroupLine->setText( aShapeName );
+ }