Focus tab for quit game dialog

This commit is contained in:
Lily 2025-02-28 18:58:00 -05:00
parent 448903efe3
commit 4b8d0f2d01
No known key found for this signature in database
GPG key ID: D916CEDDF4F93CE7

View file

@ -506,10 +506,12 @@ void TabGame::actConcede()
bool TabGame::leaveGame()
{
if (!gameClosed) {
if (!spectator)
if (!spectator) {
tabSupervisor->setCurrentWidget(this);
if (QMessageBox::question(this, tr("Leave game"), tr("Are you sure you want to leave this game?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes)
return false;
}
if (!replay)
sendGameCommand(Command_LeaveGame());