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
This commit is contained in:
Peter Kümmel 2006-11-02 22:23:26 +00:00
parent b084ac0a4a
commit 8e54e38c3b

View 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) {