Commit 192dbdcd authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

BUG: Generate mouse move events correctly.

pqBasicWidgetEventPlayer was not correctly generating mouse move events,
and they were silently dropped by Qt. These should now be propagated as
expected in normal Qt widgets - verified with the Avogadro QGLWidget
derived 3D widget.
parent c44c8d41
......@@ -93,6 +93,12 @@ bool pqBasicWidgetEventPlayer::playEvent(QObject* Object,
type = Command == "mouseMove" ? QEvent::MouseMove : type;
type = Command == "mouseRelease" ? QEvent::MouseButtonRelease : type;
type = Command == "mouseDblClick" ? QEvent::MouseButtonDblClick : type;
if (type == QEvent::MouseMove)
// We have not been setting mouse move correctly.
buttons = button;
button = Qt::NoButton;
QMouseEvent e(type, pt, button, buttons, keym);
QCoreApplication::sendEvent(widget, &e);
return true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment