Merge pull request #8723 from seanyeh/fix-confirm-dialog-enter

Qt/GameList: Use KeyPress instead of KeyRelease
This commit is contained in:
Léo Lam 2020-04-27 17:00:58 +02:00 committed by GitHub
commit 1ca682e6a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -917,12 +917,12 @@ void GameList::ConsiderViewChange()
setCurrentWidget(m_empty); setCurrentWidget(m_empty);
} }
} }
void GameList::keyReleaseEvent(QKeyEvent* event) void GameList::keyPressEvent(QKeyEvent* event)
{ {
if (event->key() == Qt::Key_Return && GetSelectedGame() != nullptr) if (event->key() == Qt::Key_Return && GetSelectedGame() != nullptr)
emit GameSelected(); emit GameSelected();
else else
QStackedWidget::keyReleaseEvent(event); QStackedWidget::keyPressEvent(event);
} }
void GameList::OnColumnVisibilityToggled(const QString& row, bool visible) void GameList::OnColumnVisibilityToggled(const QString& row, bool visible)

View File

@ -94,5 +94,5 @@ private:
bool m_prefer_list; bool m_prefer_list;
protected: protected:
void keyReleaseEvent(QKeyEvent* event) override; void keyPressEvent(QKeyEvent* event) override;
}; };