]> git.lyx.org Git - lyx.git/commitdiff
enable selection with the mouse for math and tables
authorPeter Kümmel <syntheticpp@gmx.net>
Thu, 2 Nov 2006 22:23:26 +0000 (22:23 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Thu, 2 Nov 2006 22:23:26 +0000 (22:23 +0000)
    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

src/frontends/qt4/GuiWorkArea.C

index 069738cb2a3807df65186ad77e70339c2a1cbcfc..749e849765d5fa2b25f1a6fd5418af7f802e1346 100644 (file)
@@ -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) {