Added View::removeEventHandler(..) method and added check into addEventHandler() to prevent handlers being added twice.
This commit is contained in:
@@ -113,10 +113,13 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
|
||||
|
||||
|
||||
typedef std::list< osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlers;
|
||||
|
||||
|
||||
/** Add an EventHandler that adds handling of events to the View.*/
|
||||
void addEventHandler(osgGA::GUIEventHandler* eventHandler);
|
||||
|
||||
/** Remove an EventHandler from View.*/
|
||||
void removeEventHandler(osgGA::GUIEventHandler* eventHandler);
|
||||
|
||||
/** Get the View's list of EventHandlers.*/
|
||||
EventHandlers& getEventHandlers() { return _eventHandlers; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user