HBox: fix error when setting firstButton sometimes

This commit is contained in:
miruka 2020-03-15 16:07:09 -04:00
parent 25101578cc
commit beac0ce3dd

View File

@ -67,11 +67,11 @@ Rectangle {
id: buttonRepeater id: buttonRepeater
model: [] model: []
onItemAdded: onItemAdded: if (index === 0 && box)
if (index === 0) firstButton = buttonRepeater.itemAt(0) box.firstButton = buttonRepeater.itemAt(0)
onItemRemoved: onItemRemoved: if (index === 0 && box)
if (index === 0) firstButton = null box.firstButton = null
HButton { HButton {
id: button id: button