22434: [CEA 1022] If selection is disabled, the contextual menu of VTK view does not update on selected object

Fix processOwner() for the case of disabled SVTK selection
This commit is contained in:
eap 2013-12-05 09:32:23 +00:00
parent 370bb866cf
commit 78bfc8db7d

View File

@ -93,10 +93,16 @@ bool SMESHGUI_Selection::processOwner( const LightApp_DataOwner* ow )
{
const LightApp_SVTKDataOwner* owner =
dynamic_cast<const LightApp_SVTKDataOwner*> ( ow );
if( owner )
if( owner ) {
myActors.append( dynamic_cast<SMESH_Actor*>( owner->GetActor() ) );
else
}
else if ( ow ) { // SVTK selection disabled
QString entry = ow->entry();
myActors.append( SMESH::FindActorByEntry( entry.toStdString().c_str() ));
}
else {
myActors.append( 0 );
}
return true;
}