Just focus the search field on Space.

This commit is contained in:
John Preston 2024-05-01 12:57:47 +04:00
parent 9166a1c3a6
commit 32483fa13b

View file

@ -3270,7 +3270,9 @@ void Widget::keyPressEvent(QKeyEvent *e) {
// query while still show _suggestions animated, if it is a space. // query while still show _suggestions animated, if it is a space.
_postponeProcessSearchFocusChange = true; _postponeProcessSearchFocusChange = true;
_search->setFocusFast(); _search->setFocusFast();
QCoreApplication::sendEvent(_search->rawTextEdit(), e); if (e->key() != Qt::Key_Space) {
QCoreApplication::sendEvent(_search->rawTextEdit(), e);
}
_postponeProcessSearchFocusChange = false; _postponeProcessSearchFocusChange = false;
processSearchFocusChange(); processSearchFocusChange();
} else { } else {