HBox: fix error when setting firstButton sometimes
This commit is contained in:
parent
25101578cc
commit
beac0ce3dd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user