]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To implement previously declared function - Handle(SALOME_InteractiveObject) FindIObj...
authorapo <apo@opencascade.com>
Fri, 5 May 2006 13:12:00 +0000 (13:12 +0000)
committerapo <apo@opencascade.com>
Fri, 5 May 2006 13:12:00 +0000 (13:12 +0000)
src/SVTK/SVTK_View.cxx
src/SVTK/SVTK_View.h
src/SVTK/SVTK_ViewWindow.cxx
src/SVTK/SVTK_ViewWindow.h

index 86b28ed839a330ea408041c508925a1f7f2417e6..34e8b82b857d8405c9035dc157260775682f270e 100644 (file)
@@ -209,6 +209,24 @@ SVTK_View
   Repaint();
 }
 
+/*!
+  Display object
+  \param theEntry - entry that corresponds to intractive objects
+*/
+Handle(SALOME_InteractiveObject)
+SVTK_View
+::FindIObject(const char* theEntry) 
+{
+  using namespace SVTK;
+  SALOME_Actor* anActor = 
+    Find<SALOME_Actor>(getRenderer()->GetActors(),
+                      TIsSameEntry<SALOME_Actor>(theEntry));
+  if(anActor != NULL)
+    return anActor->getIO();
+  return NULL;
+}
+
 /*!
    Redirect the request to #SVTK_Renderer::SetPreselectionProp
 */
index 589d20e8862824d9616bb0b08ecfc7ff28943deb..2a8fe4c8b2efa09f95483648bec6173bc57c6a2f 100644 (file)
@@ -122,7 +122,7 @@ public:
   void
   unHighlightAll();
 
-  /* Selection Management */
+  //! Try to find a SALOME_InteractiveObject in the view that corresponds to the entry
   Handle(SALOME_InteractiveObject) 
   FindIObject(const char* Entry);
 
index 346345fe39563a5fe65830557b63202aa2c305af..af284a64bb3ac86d085c46370f31aea03adf7c58 100755 (executable)
@@ -365,6 +365,17 @@ SVTK_ViewWindow
   return myView->isVisible( theIO );
 }
 
+/*!
+  Display object
+  \param theEntry - entry that corresponds to intractive objects
+*/
+Handle(SALOME_InteractiveObject)
+SVTK_ViewWindow
+::FindIObject(const char* theEntry) 
+{
+  return myView->FindIObject(theEntry);
+}
+
 /*!
   Display object
   \param theIO - object
index 1f53bf7d2f9635fca03e3425d94ae148f909355c..7e9c839720aca715e7d4e4df8903588f42776cf8 100755 (executable)
@@ -136,7 +136,7 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
   bool
   isVisible(const Handle(SALOME_InteractiveObject)& theIObject);
 
-  /* selection */
+  //! Redirect the request to #SVTK_View::FindIObject (to support old code)
   //----------------------------------------------------------------------------
   Handle(SALOME_InteractiveObject) 
   FindIObject(const char* theEntry);