Browse Source

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.
master
SomberNight 2 years ago
parent
commit
48a96f6776
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 4
      electrum/gui/qml/components/wizard/Wizard.qml

4
electrum/gui/qml/components/wizard/Wizard.qml

@ -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()
}

Loading…
Cancel
Save