From: James Turner Date: Tue, 12 Mar 2013 21:14:31 +0000 (+0000) Subject: Fix pick-callbacks with no action. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d2c03a665185f03a4463e96a4146e8ae5d171330;p=simgear.git Fix pick-callbacks with no action. Ensure pick animations work only to show a tooltip. Thanks to Emilian for noticing I broke this --- diff --git a/simgear/scene/model/SGPickAnimation.cxx b/simgear/scene/model/SGPickAnimation.cxx index 68da16fb..67a6fc91 100644 --- a/simgear/scene/model/SGPickAnimation.cxx +++ b/simgear/scene/model/SGPickAnimation.cxx @@ -388,6 +388,7 @@ SGPickAnimation::innerSetupPickGroup(osg::Group* commonGroup, osg::Group& parent // make a trivial PickCallback to hang the hovered off of SGPropertyNode_ptr dummyNode(new SGPropertyNode); pickCb = new PickCallback(dummyNode.ptr(), getModelRoot()); + ud->addPickCallback(pickCb); } pickCb->addHoverBindings(getConfig()->getNode("hovered"), getModelRoot());