bar modules own active state, fix circular effectiveVisible deadlock in BarGroup
This commit is contained in:
parent
7eaa50327f
commit
7e594b7f8d
24 changed files with 52 additions and 73 deletions
|
|
@ -27,7 +27,18 @@ Item {
|
|||
readonly property real _blr: S.Theme.radius
|
||||
readonly property real _brr: S.Theme.radius
|
||||
|
||||
visible: row.visibleChildren.length > 0
|
||||
// Check children's `active` instead of visibleChildren to avoid circular
|
||||
// effectiveVisible dependency: if the BarGroup is invisible, children's
|
||||
// effectiveVisible is always false, so visibleChildren stays empty and
|
||||
// the group can never become visible again. `active` is a plain property
|
||||
// on BarModule that is not affected by the parent visibility chain.
|
||||
visible: {
|
||||
for (let i = 0; i < row.children.length; i++) {
|
||||
if (row.children[i].active)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
implicitWidth: row.implicitWidth + _pad * 2
|
||||
implicitHeight: S.Theme.barHeight - 3 - _pad
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue