From: apo Date: Fri, 5 May 2006 13:12:00 +0000 (+0000) Subject: To implement previously declared function - Handle(SALOME_InteractiveObject) FindIObj... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=78b3486f0a284cda2b25943052cc0f6194b10723;p=modules%2Fgui.git To implement previously declared function - Handle(SALOME_InteractiveObject) FindIObject(const char* theEntry) --- diff --git a/src/SVTK/SVTK_View.cxx b/src/SVTK/SVTK_View.cxx index 86b28ed83..34e8b82b8 100644 --- a/src/SVTK/SVTK_View.cxx +++ b/src/SVTK/SVTK_View.cxx @@ -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(getRenderer()->GetActors(), + TIsSameEntry(theEntry)); + if(anActor != NULL) + return anActor->getIO(); + + return NULL; +} + /*! Redirect the request to #SVTK_Renderer::SetPreselectionProp */ diff --git a/src/SVTK/SVTK_View.h b/src/SVTK/SVTK_View.h index 589d20e88..2a8fe4c8b 100644 --- a/src/SVTK/SVTK_View.h +++ b/src/SVTK/SVTK_View.h @@ -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); diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 346345fe3..af284a64b 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -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 diff --git a/src/SVTK/SVTK_ViewWindow.h b/src/SVTK/SVTK_ViewWindow.h index 1f53bf7d2..7e9c83972 100755 --- a/src/SVTK/SVTK_ViewWindow.h +++ b/src/SVTK/SVTK_ViewWindow.h @@ -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);