From 3d0f4868df9f6312e9f961da42adfc7d0f345847 Mon Sep 17 00:00:00 2001 From: lilyhuang-github <112970249+lilyhuang-github@users.noreply.github.com> Date: Sun, 2 Mar 2025 09:29:17 -0500 Subject: [PATCH] Focus tab for quit game dialog (#5670) --- cockatrice/src/client/tabs/tab_game.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/client/tabs/tab_game.cpp b/cockatrice/src/client/tabs/tab_game.cpp index 87f92c845..e6c794a6a 100644 --- a/cockatrice/src/client/tabs/tab_game.cpp +++ b/cockatrice/src/client/tabs/tab_game.cpp @@ -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());