<div dir="ltr"><div>Hi Scott,</div><div><br></div><div>I don't know where the issue lies, but most likely it's in the windowing integration side rather than the core OSG as it doesn't look like you'll be relying on any of the OSG's native windowing/event handling. There might be an issue with osgQt, but I'm not the author of maintainer for it so will have to defer to others on this. Or it could be an issue with osgEarth.<br></div><div><br></div><div>The best I can suggest is that you build the OSG, osgEarth, osgQt and your application in debug mode, then step through the code in a debugger to see where the control flow passes when the wheelEvent happens.<br></div><div><br>Cheers,<br></div><div>Robert.<br></div><br>On Thursday, 13 February 2020 07:58:17 UTC, Scott Shaw wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">I think I'm running into a bug in OSG. I've implemented my own versions of mouse events in a sub-classed osgQt::GLWidget so I can redraw the 3D view only when necessary:<div><div><br></div><div>void Osg3dViewCM::mousePressEvent(<wbr>QMouseEvent* event)</div><div>{</div><div> m_mouseDown = true;</div><div><br></div><div> if (_cameraManipulator.valid())</div><div> {</div><div> osgQt::GLWidget::<wbr>mousePressEvent(event);</div><div><br></div><div> frame();</div><div> }</div><div>}</div><div><br></div><div>void Osg3dViewCM::<wbr>mouseReleaseEvent(QMouseEvent* event)</div><div>{</div><div> m_mouseDown = false;</div><div><br></div><div> if (_cameraManipulator.valid())</div><div> {</div><div> osgQt::GLWidget::<wbr>mouseReleaseEvent(event);</div><div><br></div><div> frame();</div><div> }</div><div><br></div><div> emit cameraChanged(_<wbr>cameraManipulator-><wbr>getInverseMatrix());</div><div>}</div><div><div><br></div><div>void Osg3dViewCM::mouseMoveEvent(<wbr>QMouseEvent* event)</div><div>{</div><div> if (_cameraManipulator.valid() && m_mouseDown)</div><div> {</div><div> osgQt::GLWidget::<wbr>mouseMoveEvent(event);</div><div><br></div><div> frame();</div><div> }</div><div>}</div><div><br></div><div>void Osg3dViewCM::wheelEvent(<wbr>QWheelEvent *event)</div><div>{</div><div><span style="white-space:pre"></span> if (_cameraManipulator.valid())</div><div> {</div><div> osgQt::GLWidget::wheelEvent(<wbr>event);</div><div><br></div><div> frame();</div><div> }</div><div>}</div></div><div><br></div><div>I'm using a default osgEarth::Util::<wbr>EarthManipulator and clicking and dragging on the view updates it without an issue rotating or panning properly. For some reason, when I scroll the wheel, the frame function doesn't update the view. If I click on the view after scrolling, it gets updated with the zoom operation applied. Am I missing something?</div></div><div><br></div><div>Thank you,</div><div>Scott</div></div></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/a280cec0-b302-44e1-8a4d-b27dedc82164%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/a280cec0-b302-44e1-8a4d-b27dedc82164%40googlegroups.com</a>.<br />