<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(QMouseEvent* event)</div><div>{</div><div> m_mouseDown = true;</div><div><br></div><div> if (_cameraManipulator.valid())</div><div> {</div><div> osgQt::GLWidget::mousePressEvent(event);</div><div><br></div><div> frame();</div><div> }</div><div>}</div><div><br></div><div>void Osg3dViewCM::mouseReleaseEvent(QMouseEvent* event)</div><div>{</div><div> m_mouseDown = false;</div><div><br></div><div> if (_cameraManipulator.valid())</div><div> {</div><div> osgQt::GLWidget::mouseReleaseEvent(event);</div><div><br></div><div> frame();</div><div> }</div><div><br></div><div> emit cameraChanged(_cameraManipulator->getInverseMatrix());</div><div>}</div><div><div><br></div><div>void Osg3dViewCM::mouseMoveEvent(QMouseEvent* event)</div><div>{</div><div> if (_cameraManipulator.valid() && m_mouseDown)</div><div> {</div><div> osgQt::GLWidget::mouseMoveEvent(event);</div><div><br></div><div> frame();</div><div> }</div><div>}</div><div><br></div><div>void Osg3dViewCM::wheelEvent(QWheelEvent *event)</div><div>{</div><div><span style="white-space:pre"></span> if (_cameraManipulator.valid())</div><div> {</div><div> osgQt::GLWidget::wheelEvent(event);</div><div><br></div><div> frame();</div><div> }</div><div>}</div></div><div><br></div><div>I'm using a default osgEarth::Util::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>
<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/a6b79fd7-c723-451a-8dab-407f1e41bd16%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/a6b79fd7-c723-451a-8dab-407f1e41bd16%40googlegroups.com</a>.<br />