From 52a42d0354de81a228bab302d268dff92d64670a Mon Sep 17 00:00:00 2001 From: Shadooow Date: Mon, 31 Jan 2022 08:46:52 +0000 Subject: [PATCH] Changed behavior of Select All button in movement box. Now it will select remaining soldiers, if only some of them are selected instead of deselecting them. It will of course still deselect all if all are selected. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9286 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Map Screen Interface.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Strategic/Map Screen Interface.cpp b/Strategic/Map Screen Interface.cpp index 22afddb1..03e7bcad 100644 --- a/Strategic/Map Screen Interface.cpp +++ b/Strategic/Map Screen Interface.cpp @@ -4259,7 +4259,17 @@ void MoveMenuBtnCallback(MOUSE_REGION * pRegion, INT32 iReason ) if (iRegionType == ALL_SQUADS) { - if (IsAnythingSelectedForMoving()) + bool all_selected_already = true; + for (int i = 0; i < iListIndex; i++) + { + if (!AllSoldiersInSquadSelected(iSquadMovingList[i])) + { + all_selected_already = false; + break; + } + } + + if (all_selected_already) { for (int i = 0; i < iListIndex; i++) {