qml: move final wizard submit() to WizardComponent.finish handler
This commit is contained in:
@@ -84,6 +84,14 @@ ElDialog {
|
|||||||
console.log('END')
|
console.log('END')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
page.finish.connect(function() {
|
||||||
|
// run wizard.submit() a final time, so that the navmap[view]['accept'] handler can run (if any)
|
||||||
|
var newview = wiz.submit(page.wizard_data)
|
||||||
|
_setWizardData(newview.wizard_data)
|
||||||
|
console.log('wizard finished')
|
||||||
|
// finish wizard
|
||||||
|
wizard.doAccept()
|
||||||
|
})
|
||||||
page.prev.connect(function() {
|
page.prev.connect(function() {
|
||||||
var wdata = wiz.prev()
|
var wdata = wiz.prev()
|
||||||
})
|
})
|
||||||
@@ -134,11 +142,7 @@ ElDialog {
|
|||||||
function finish() {
|
function finish() {
|
||||||
currentItem.accept()
|
currentItem.accept()
|
||||||
_setWizardData(pages.contentChildren[currentIndex].wizard_data)
|
_setWizardData(pages.contentChildren[currentIndex].wizard_data)
|
||||||
// run wizard.resolve_next() a final time, so that the navmap[view]['accept'] handler can run (if any)
|
currentItem.finish()
|
||||||
var newview = wiz.submit(wizard_data)
|
|
||||||
_setWizardData(newview.wizard_data)
|
|
||||||
// finish wizard
|
|
||||||
wizard.doAccept()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool pagevalid: false
|
property bool pagevalid: false
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import QtQuick.Controls.Material
|
|||||||
Pane {
|
Pane {
|
||||||
id: root
|
id: root
|
||||||
signal next
|
signal next
|
||||||
|
signal finish
|
||||||
signal prev
|
signal prev
|
||||||
signal accept
|
signal accept
|
||||||
property var wizard_data : ({})
|
property var wizard_data : ({})
|
||||||
|
|||||||
Reference in New Issue
Block a user