1
0

qml wizard: run navmap[view]['accept'] handler a final time on finish

For example, see
061c821128/electrum/plugins/trustedcoin/trustedcoin.py (L624)
Even if navmap[view]['last'] is True, we still want the navmap[view]['accept'] handler to run.

fixes https://github.com/spesmilo/electrum/issues/8861

---

Note that an analogous issue does not exist for the desktop qt gui,
see 061c821128/electrum/gui/qt/wizard/wizard.py (L206)
There, wizard.resolve_next is called regardless of is_last.
This commit is contained in:
SomberNight
2024-01-31 12:52:01 +00:00
parent acae6751d2
commit 48a96f6776

View File

@@ -134,6 +134,10 @@ ElDialog {
function finish() {
currentItem.accept()
_setWizardData(pages.contentChildren[currentIndex].wizard_data)
// run wizard.resolve_next() a final time, so that the navmap[view]['accept'] handler can run (if any)
var newview = wiz.submit(wizard_data)
_setWizardData(newview.wizard_data)
// finish wizard
wizard.doAccept()
}