Move assignment of mousePressed variable in QWidgetTextControl

Or else we never hit the path where middle button click pasts selection
on X11. This is also how it worked in Qt 4.

Change-Id: Ia090c465db0e5e8cb249f5d752e0bb86951e2eb0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Jorgen Lind 2012-09-04 15:03:53 +02:00 committed by Qt by Nokia
parent d7cfd02082
commit 0eb3d74386

View File

@ -1527,7 +1527,6 @@ void QWidgetTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton butto
{
Q_Q(QWidgetTextControl);
mousePressed = (interactionFlags & Qt::TextSelectableByMouse);
mousePressPos = pos.toPoint();
#ifndef QT_NO_DRAGANDDROP
@ -1558,6 +1557,8 @@ void QWidgetTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton butto
const QTextCursor oldSelection = cursor;
const int oldCursorPos = cursor.position();
mousePressed = (interactionFlags & Qt::TextSelectableByMouse);
commitPreedit();
if (trippleClickTimer.isActive()