]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for the bug 21194: EDF SMESH: Cannot display a group by clicking on the "eye...
authorrnv <rnv@opencascade.com>
Tue, 22 Feb 2011 07:57:36 +0000 (07:57 +0000)
committerrnv <rnv@opencascade.com>
Tue, 22 Feb 2011 07:57:36 +0000 (07:57 +0000)
src/OBJECT/SMESH_Actor.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.cxx

index c86639b640903b8dcfa304620e34d0b804d5316a..df648c4589c67ce1cbcd549a9711d6dcbf416824 100644 (file)
@@ -104,7 +104,7 @@ SMESH_Actor* SMESH_Actor::New(TVisualObjPtr theVisualObj,
                               int theIsClear)
 {
   SMESH_ActorDef* anActor = NULL;
-  if(theVisualObj->GetNbEntities(SMDSAbs_Node) > 0 ) {
+  if(theVisualObj->IsValid() ) {
     anActor = SMESH_ActorDef::New();
     if(!anActor->Init(theVisualObj,theEntry,theName,theIsClear)){
       anActor->Delete();
index 52274c685ddfbafa024e3e936789ae5fc45473ea..76a3019cf2bea0c08c4523a14504e674b5f4bcad 100644 (file)
@@ -611,7 +611,7 @@ namespace SMESH
         }
 
         SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( aSObj ));
-        if(!CORBA::is_nil(aGroup))
+        if(!CORBA::is_nil(aGroup) && anActor)
         {
           SALOMEDS::Color aColor = aGroup->GetColor();
           if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ) )