From 553ccdebd178cfdca943800900dec0bde561de68 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 7 Mar 2022 18:18:18 +0100 Subject: [PATCH] qml: eliminate animation glitching when removing a page from the wizard (back button) --- electrum/gui/qml/components/Wizard.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/Wizard.qml b/electrum/gui/qml/components/Wizard.qml index 1c6d5c341..a4a4e1b74 100644 --- a/electrum/gui/qml/components/Wizard.qml +++ b/electrum/gui/qml/components/Wizard.qml @@ -24,6 +24,11 @@ Dialog { // page.last -> pages.lastpage to propagate the state without the binding // going stale. function _loadNextComponent(comp, wdata={}) { + // remove any existing pages after current page + while (pages.contentChildren[pages.currentIndex+1]) { + pages.takeItem(pages.currentIndex+1).destroy() + } + var page = comp.createObject(pages, { 'visible': Qt.binding(function() { return pages.currentItem === this @@ -56,7 +61,6 @@ Dialog { _setWizardData(pages.contentChildren[currentIndex].wizard_data) pages.pagevalid = pages.contentChildren[currentIndex].valid pages.lastpage = pages.contentChildren[currentIndex].last - pages.contentChildren[currentIndex+1].destroy() } function next() {