]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMGUI/GEOM_Displayer.cxx
Salome HOME
Merge from OCC_development_generic_2006
[modules/geom.git] / src / GEOMGUI / GEOM_Displayer.cxx
index def483eb21a54e4e3875ff54f1fd3dfc370a63e7..40b20d41fc5327dae1b4c1e5fa459ae64677292c 100644 (file)
@@ -83,6 +83,7 @@
 
 // VTK Includes
 #include <vtkActorCollection.h>
+#include <vtkProperty.h>
 
 // STL Includes
 #include <cstring>
@@ -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
+  }
 }
 
 //=================================================================