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
model: []
onItemAdded:
if (index === 0) firstButton = buttonRepeater.itemAt(0)
onItemAdded: if (index === 0 && box)
box.firstButton = buttonRepeater.itemAt(0)
onItemRemoved:
if (index === 0) firstButton = null
onItemRemoved: if (index === 0 && box)
box.firstButton = null
HButton {
id: button