mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 12:54:10 -07:00
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:
parent
3fb3a329ef
commit
25e2633ee7
3 changed files with 17 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue