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."

This commit is contained in:
Robert Osfield
2007-05-26 15:47:53 +00:00
parent 6b75603ace
commit 27a1406819

View File

@@ -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());
}