X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMGUI%2FGEOM_Displayer.cxx;h=40b20d41fc5327dae1b4c1e5fa459ae64677292c;hb=e180c20f73ffa96c2d039106f2a2a868c8bc0df1;hp=20b49e11c866fe3142892aaaccd8fd24bbc4ac6d;hpb=ff0bec3d6388380c3df8434aee2d977d0f06e68e;p=modules%2Fgeom.git diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index 20b49e11c..40b20d41f 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -83,6 +83,7 @@ // VTK Includes #include +#include // STL Includes #include @@ -838,12 +839,13 @@ void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& the 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 + } } //================================================================= @@ -1094,3 +1096,8 @@ void GEOM_Displayer::setShape( const TopoDS_Shape& theShape ) { myShape = theShape; } + +bool GEOM_Displayer::canBeDisplayed( const QString& /*entry*/, const QString& viewer_type ) const +{ + return viewer_type==SOCC_Viewer::Type() || viewer_type==SVTK_Viewer::Type(); +}