mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
bugfix: enable first, then set text
This commit is contained in:
@@ -983,6 +983,10 @@ void StackQueue::StackBox::setUnit(const battle::Unit * unit, size_t turn, std::
|
||||
if (unit->unitType()->getId() == CreatureID::ARROW_TOWERS)
|
||||
icon->setFrame(owner->getSiegeShooterIconID(), 1);
|
||||
|
||||
roundRect->setEnabled(currentTurn.has_value());
|
||||
if(!owner->embedded)
|
||||
round->setEnabled(currentTurn.has_value());
|
||||
|
||||
amount->setText(TextOperations::formatMetric(unit->getCount(), 4));
|
||||
if(currentTurn && !owner->embedded)
|
||||
{
|
||||
@@ -991,9 +995,6 @@ void StackQueue::StackBox::setUnit(const battle::Unit * unit, size_t turn, std::
|
||||
roundRect->pos.w = len + 6;
|
||||
round->setText(tmp);
|
||||
}
|
||||
roundRect->setEnabled(currentTurn.has_value());
|
||||
if(!owner->embedded)
|
||||
round->setEnabled(currentTurn.has_value());
|
||||
|
||||
if(stateIcon)
|
||||
{
|
||||
|
Reference in New Issue
Block a user