mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 23:29:44 -06:00
Qt/GameList: Use KeyPress instead of KeyRelease
This fixes a bug where pressing Enter in the "Do you want to stop the current emulation?" confirmation popup also triggers a KeyRelease in GameList, which starts a new game.
This commit is contained in:
@ -897,12 +897,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)
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user