From 6e4900b79fd22f118d6a7eb1793dfcb0baaeb72d Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 30 Oct 2021 14:41:44 +0300 Subject: [PATCH 4/4] Qt: Allow adjusting leader of the nation player has already selected In the pregame nation selection it was impossible to reselect the same nation one had already. See osdn #43024 Signed-off-by: Marko Lindqvist --- client/gui-qt/dialogs.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/gui-qt/dialogs.cpp b/client/gui-qt/dialogs.cpp index 7cbd7dd05b..420852fb60 100644 --- a/client/gui-qt/dialogs.cpp +++ b/client/gui-qt/dialogs.cpp @@ -825,6 +825,7 @@ void races_dialog::leader_selected(int index) void races_dialog::ok_pressed() { QByteArray ln_bytes; + struct player *natplr; if (selected_nation == -1) { return; @@ -840,7 +841,8 @@ void races_dialog::ok_pressed() return; } - if (nation_by_number(selected_nation)->player != NULL) { + natplr = nation_by_number(selected_nation)->player; + if (natplr != NULL && natplr != client_player()) { output_window_append(ftc_client, _("Nation has been chosen by other player")); return; -- 2.30.2