diff --git a/include/osgGA/KeySwitchCameraManipulator b/include/osgGA/KeySwitchCameraManipulator index 57a2acb5a..53a41a5b1 100644 --- a/include/osgGA/KeySwitchCameraManipulator +++ b/include/osgGA/KeySwitchCameraManipulator @@ -36,8 +36,13 @@ public: */ void addNumberedCameraManipulator(CameraManipulator *cm); + CameraManipulator* getCurrentCameraManipulator() { return _current.get(); } + + const CameraManipulator* getCurrentCameraManipulator() const { return _current.get(); } + // Overrides from CameraManipulator... + virtual void setCamera(osg::Camera* c) { _current->setCamera(c); } virtual const osg::Camera * getCamera() const { return _current->getCamera(); } diff --git a/src/osgGA/KeySwitchCameraManipulator.cpp b/src/osgGA/KeySwitchCameraManipulator.cpp index 0e89d5de7..1f4cd6589 100644 --- a/src/osgGA/KeySwitchCameraManipulator.cpp +++ b/src/osgGA/KeySwitchCameraManipulator.cpp @@ -27,7 +27,6 @@ bool KeySwitchCameraManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapt KeyManipMap::iterator it=_manips.find(ea.getKey()); if(it != _manips.end()){ osg::notify(osg::INFO)<<"Switching to manipulator: "<<(*it).second.first<second.second->setNode(_current->getNode()); it->second.second->setCamera(_current->getCamera()); it->second.second->init(ea,aa);