Trigger onToggle instead of onResourceSelected when pressing enter
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
7532172233
commit
0f3ac57fdd
1 changed files with 2 additions and 6 deletions
|
@ -132,13 +132,9 @@ auto ResourcePage::eventFilter(QObject* watched, QEvent* event) -> bool
|
||||||
m_searchTimer.start(350);
|
m_searchTimer.start(350);
|
||||||
}
|
}
|
||||||
} else if (watched == m_ui->packView) {
|
} else if (watched == m_ui->packView) {
|
||||||
|
// stop the event from going to the confirm button
|
||||||
if (keyEvent->key() == Qt::Key_Return) {
|
if (keyEvent->key() == Qt::Key_Return) {
|
||||||
onResourceSelected();
|
onToggle(m_ui->packView->currentIndex());
|
||||||
|
|
||||||
// To have the 'select mod' button outlined instead of the 'review and confirm' one
|
|
||||||
m_ui->resourceSelectionButton->setFocus(Qt::FocusReason::ShortcutFocusReason);
|
|
||||||
m_ui->packView->setFocus(Qt::FocusReason::NoFocusReason);
|
|
||||||
|
|
||||||
keyEvent->accept();
|
keyEvent->accept();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue