1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix stack amount boxes flickering between actions

This commit is contained in:
Ivan Savenko 2023-03-29 13:14:51 +03:00
parent 3af829e6af
commit 1fcaeba8e0

View File

@ -380,7 +380,7 @@ void BattleStacksController::updateBattleAnimations()
if (hadAnimations && currentAnimations.empty())
{
stackAmountBoxHidden.clear();
//stackAmountBoxHidden.clear();
owner.executeStagedAnimations();
if (currentAnimations.empty())
owner.onAnimationsFinished();
@ -391,6 +391,9 @@ void BattleStacksController::updateBattleAnimations()
void BattleStacksController::addNewAnim(BattleAnimation *anim)
{
if (currentAnimations.empty())
stackAmountBoxHidden.clear();
owner.onAnimationsStarted();
currentAnimations.push_back(anim);
@ -685,6 +688,8 @@ void BattleStacksController::endAction(const BattleAction* action)
owner.executeStagedAnimations();
owner.waitForAnimations();
stackAmountBoxHidden.clear();
owner.windowObject->blockUI(activeStack == nullptr);
removeExpiredColorFilters();
}