sm->clearFilters();
SALOME_View* vf = GetActiveView();
- if ( vf )
- {
- SALOME_Prs* prs = vf->CreatePrs( theIO.IsNull() ? 0 : theIO->getEntry() );
- vf->LocalSelection( prs, theMode );
- delete prs; // delete presentation because displayer is its owner
- }
+ if ( vf ) {
+ if (!theIO.IsNull() && !vf->isVisible(theIO))
+ Display(theIO);
+ SALOME_Prs* prs = vf->CreatePrs( theIO.IsNull() ? 0 : theIO->getEntry() );
+ vf->LocalSelection( prs, theMode );
+ delete prs; // delete presentation because displayer is its owner
+ }
}
//=================================================================