fix(StatusStackModal): init the next/finish buttons

call `updateRightButtons()` also on creation to correctly initialize the
Next and Finish buttons in derived classes, when one overrrides these

can be seen in the Backup Seed dialog where the Next button is not
enabled even though all 3 boxes are checked
This commit is contained in:
Lukáš Tinkl 2022-07-11 13:38:05 +02:00 committed by Michał Cieślak
parent 524168410d
commit ea24acd7ce
1 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ StatusModal {
property alias replaceItem: replaceLoader.sourceComponent
property alias subHeaderItem: subHeaderLoader.sourceComponent
readonly property int itemsCount: stackLayout.children.length
readonly property int itemsCount: stackLayout.count
readonly property var currentItem: stackLayout.currentItem
property Item nextButton: StatusButton {
@ -44,6 +44,7 @@ StatusModal {
}
}
Component.onCompleted: updateRightButtons()
onCurrentIndexChanged: updateRightButtons()
onReplaceItemChanged: updateRightButtons()