From 242f34ddc8dc4e6a83fae4f4973c397f840718ea Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 22 Feb 2011 07:57:36 +0000 Subject: [PATCH] Fix for the bug 21194: EDF SMESH: Cannot display a group by clicking on the "eye" of the OB --- src/OBJECT/SMESH_Actor.cxx | 2 +- src/SMESHGUI/SMESHGUI_VTKUtils.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index c86639b64..df648c458 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -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(); diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 52274c685..76a3019cf 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -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 ) )