From 4b8d0f2d01d0ca1e2f9c48cd9c4e481da26e4ea8 Mon Sep 17 00:00:00 2001 From: Lily <112970249+lilyhuang-github@users.noreply.github.com> Date: Fri, 28 Feb 2025 18:58:00 -0500 Subject: [PATCH] Focus tab for quit game dialog --- 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());