Reconcile tax counter visibility ownership and harden tax log formatting

- Make AbstractCounter::setActive() the sole owner of counter visibility; document the contract.
  - Drop the redundant setVisible() from CommandZone::rearrangeTaxCounters(); it now only lays out by isActive().
  - Format tax log lines with a single atomic 4-arg arg() instead of mixing string and int overloads.
This commit is contained in:
DawnFire42 2026-06-16 16:36:12 -04:00
parent 3fb3a329ef
commit 25e2633ee7
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
3 changed files with 17 additions and 7 deletions

View file

@ -113,7 +113,13 @@ public:
/**
* @brief Sets the active state of this counter.
* When inactive, the counter is hidden via setVisible(false).
*
* This is the sole owner of the counter's own visibility flag: active maps directly to
* setVisible(_active). For counters nested in another item (e.g. tax counters parented to
* the command zone), Qt AND-s this flag with the parent's visibility, so an active counter
* inside a hidden zone still does not render. Container layout code must therefore not set
* visibility itself; it only positions counters and may read isActive().
*
* @param _active True to show and enable the counter, false to hide it
*/
virtual void setActive(bool _active);