QWidgetResizeHandler - undo (potential) move break

When the mode is center we are typically moving the dock widget,
but we should however not stop if the mode is Center.
Though the regression
(in commit e662b4ed721ee36f0a17cc413494b7d09395d52e)
is not easy to reproduce it is clear
that the code later may call "mouseMoveEvent(e)" and the
mode is also checked for being Center and in that case
the eventfilter (function) returns true (not false).

Change-Id: I3936ec56833d613f78920d9ccf8ddb66e19e9802
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Thorbjørn Lund Martsum 2017-12-07 11:19:40 +01:00
parent f0d226e4c5
commit d2d6c6f781

View File

@ -120,7 +120,7 @@ bool QWidgetResizeHandler::eventFilter(QObject *o, QEvent *ee)
break;
const QRect widgetRect = widget->rect().marginsAdded(QMargins(range, range, range, range));
const QPoint cursorPoint = widget->mapFromGlobal(e->globalPos());
if (!widgetRect.contains(cursorPoint) || mode == Center || mode == Nowhere)
if (!widgetRect.contains(cursorPoint) || mode == Nowhere)
return false;
if (e->button() == Qt::LeftButton) {
#if 0 // Used to be included in Qt4 for Q_WS_X11