From e6e7679a2c95d17992f1d904058b229b9174493b Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Sun, 11 Sep 2022 11:31:24 +0300 Subject: [PATCH] activate battle hexes after heroes gives hexes higher priority when performing "hit test" for mouse click as CGuiHandler::handleElementActivate() uses push_front to a list this fixes RMB click on the topmost corner stacks: now it shows stack info instead of hero --- client/battle/CBattleInterface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/battle/CBattleInterface.cpp b/client/battle/CBattleInterface.cpp index 5cb46ff95..b416578ba 100644 --- a/client/battle/CBattleInterface.cpp +++ b/client/battle/CBattleInterface.cpp @@ -502,13 +502,14 @@ void CBattleInterface::activate() bWait->activate(); bDefence->activate(); - for (auto hex : bfield) - hex->activate(); - if (attackingHero) attackingHero->activate(); if (defendingHero) defendingHero->activate(); + + for (auto hex : bfield) + hex->activate(); + if (settings["battle"]["showQueue"].Bool()) queue->activate();