Fix for the bug 21194: EDF SMESH: Cannot display a group by clicking on the "eye" of the OB

This commit is contained in:
rnv 2011-02-22 07:57:36 +00:00
parent e02bf0244b
commit 242f34ddc8
2 changed files with 2 additions and 2 deletions

View 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();

View 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 ) )