From: Peter Kümmel Date: Thu, 2 Nov 2006 22:23:26 +0000 (+0000) Subject: enable selection with the mouse for math and tables X-Git-Tag: 1.6.10~12083 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8e54e38c3b32dd3f158d52844bae18db396601be;p=lyx.git enable selection with the mouse for math and tables 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 --- diff --git a/src/frontends/qt4/GuiWorkArea.C b/src/frontends/qt4/GuiWorkArea.C index 069738cb2a..749e849765 100644 --- a/src/frontends/qt4/GuiWorkArea.C +++ b/src/frontends/qt4/GuiWorkArea.C @@ -100,7 +100,7 @@ static mouse_button::state q_button_state(Qt::MouseButton button) /// 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) @@ -332,7 +332,7 @@ void GuiWorkArea::mouseReleaseEvent(QMouseEvent * e) 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) {