]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020501: EDF 1098 SMESH: Display only groups, edit a group: can't select face from...
authordmv <dmv@opencascade.com>
Wed, 7 Oct 2009 12:26:26 +0000 (12:26 +0000)
committerdmv <dmv@opencascade.com>
Wed, 7 Oct 2009 12:26:26 +0000 (12:26 +0000)
src/SMESHGUI/SMESHGUI_GroupDlg.cxx

index 00c3321da94037f93271ab64b35ca5e8d084e296..162b94001337772b01c6fe755f3a7f83cd175cbf 100644 (file)
@@ -1303,12 +1303,21 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
   }
 
   if (myActorsList.count() == 0) {
-    if (!myGroup->_is_nil())
-      myActorsList.append( SMESH::FindActorByObject(myGroup) );
-    else if(!myGroupOnGeom->_is_nil())
-      myActorsList.append( SMESH::FindActorByObject(myGroupOnGeom) );
-    else
-      myActorsList.append( SMESH::FindActorByObject(myMesh) );
+    if (!myGroup->_is_nil()) {
+      SMESH_Actor* anActor = SMESH::FindActorByObject(myGroup);
+      if ( anActor )
+        myActorsList.append( anActor  );
+    }
+    else if(!myGroupOnGeom->_is_nil()) {
+      SMESH_Actor* anActor = SMESH::FindActorByObject(myGroupOnGeom);
+      if ( anActor )
+        myActorsList.append( anActor );
+    }
+    else {
+      SMESH_Actor* anActor = SMESH::FindActorByObject( myMesh );
+      if ( anActor )
+        myActorsList.append( anActor );
+    }
   }
 
   // somehow, if we display the mesh, while selecting from another actor,