Qt doc for QMouseEvent::button():
Note that the returned value is always Qt::NoButton for mouse move events.
so we must use buttons() instead because later on
the code checks for the left button.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15693
a592a061-630c-0410-9148-
cb99ea01b6c8
/// return the LyX mouse button state from Qt's
/// return the LyX mouse button state from Qt's
-mouse_button::state q_motion_state(Qt::MouseButton state)
+mouse_button::state q_motion_state(Qt::MouseButtons state)
{
mouse_button::state b = mouse_button::none;
if (state & Qt::LeftButton)
{
mouse_button::state b = mouse_button::none;
if (state & Qt::LeftButton)
void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
{
FuncRequest cmd(LFUN_MOUSE_MOTION, e->x(), e->y(),
void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
{
FuncRequest cmd(LFUN_MOUSE_MOTION, e->x(), e->y(),
- q_motion_state(e->button()));
+ q_motion_state(e->buttons()));
// If we're above or below the work area...
if (e->y() <= 20 || e->y() >= viewport()->height() - 20) {
// If we're above or below the work area...
if (e->y() <= 20 || e->y() >= viewport()->height() - 20) {