QComboBox: Start blockMouseReleaseTimer after showPopup call
The layout/size hinting done in showPopup should not count towards the mouse release blocking timeout as it might take more then the double click interval itself, causing the popup to hide immediately on button release. Task-number: QTBUG-67583 Change-Id: I37ac77ac331a4f865a9242581232b85606f883c5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>bb10
parent
df91fd1198
commit
a4a730f4cb
|
|
@ -3160,7 +3160,6 @@ void QComboBoxPrivate::showPopupFromMouseEvent(QMouseEvent *e)
|
|||
#endif
|
||||
// We've restricted the next couple of lines, because by not calling
|
||||
// viewContainer(), we avoid creating the QComboBoxPrivateContainer.
|
||||
viewContainer()->blockMouseReleaseTimer.start(QApplication::doubleClickInterval());
|
||||
viewContainer()->initialClickPosition = q->mapToGlobal(e->pos());
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
}
|
||||
|
|
@ -3169,8 +3168,10 @@ void QComboBoxPrivate::showPopupFromMouseEvent(QMouseEvent *e)
|
|||
// The code below ensures that regular mousepress and pick item still works
|
||||
// If it was not called the viewContainer would ignore event since it didn't have
|
||||
// a mousePressEvent first.
|
||||
if (viewContainer())
|
||||
if (viewContainer()) {
|
||||
viewContainer()->blockMouseReleaseTimer.start(QApplication::doubleClickInterval());
|
||||
viewContainer()->maybeIgnoreMouseButtonRelease = false;
|
||||
}
|
||||
} else {
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
if (QApplication::keypadNavigationEnabled() && sc == QStyle::SC_ComboBoxEditField && lineEdit) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue