mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Trigger onToggle instead of onResourceSelected when pressing enter
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
@ -132,13 +132,9 @@ auto ResourcePage::eventFilter(QObject* watched, QEvent* event) -> bool
|
||||
m_searchTimer.start(350);
|
||||
}
|
||||
} else if (watched == m_ui->packView) {
|
||||
// stop the event from going to the confirm button
|
||||
if (keyEvent->key() == Qt::Key_Return) {
|
||||
onResourceSelected();
|
||||
|
||||
// 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);
|
||||
|
||||
onToggle(m_ui->packView->currentIndex());
|
||||
keyEvent->accept();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user