From 27a14068198c4156844f38ffff5cea1473ad8eac Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 26 May 2007 15:47:53 +0000 Subject: [PATCH] From Blake Williams, "I discovered why the \u2013CompositeViewer option for the osghud example does not work. The run() function adds a camera manipulator to each view that does not have one assigned, which causes the view with the HUD camera to point somewhere other than where it should. I just added a check before a new default camera manipulator is added to ensure that the view allows event focus before a camera manipulator is added." --- src/osgViewer/CompositeViewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index 7ffdd9d80..7311145a3 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -136,7 +136,7 @@ int CompositeViewer::run() ++itr) { osgViewer::View* view = itr->get(); - if (view->getCameraManipulator()==0) + if ((view->getCameraManipulator()==0) && view->getCamera()->getAllowEventFocus()) { view->setCameraManipulator(new osgGA::TrackballManipulator()); }