mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-31 01:50:47 +03:00
ignore enter keypress when completion is selected
This commit is contained in:
parent
aed8d23aca
commit
254b7549eb
1 changed files with 7 additions and 6 deletions
|
@ -256,12 +256,13 @@ FilteredTextEdit::keyPressEvent(QKeyEvent *event)
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
if (emoji_popup_open_) {
|
if (emoji_popup_open_) {
|
||||||
if (!completer_->popup()->currentIndex().isValid()) {
|
if (!completer_->popup()->currentIndex().isValid()) {
|
||||||
// No completion to select, do normal behavior
|
// No completion to select, do normal behavior
|
||||||
completer_->popup()->hide();
|
completer_->popup()->hide();
|
||||||
emoji_popup_open_ = false;
|
emoji_popup_open_ = false;
|
||||||
}
|
} else {
|
||||||
else
|
event->ignore();
|
||||||
event->ignore();
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(event->modifiers() & Qt::ShiftModifier)) {
|
if (!(event->modifiers() & Qt::ShiftModifier)) {
|
||||||
|
|
Loading…
Reference in a new issue