From d52cd2f2e6ad30d05988c920f55c4f4fd5015d0d Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 16 Aug 2022 16:34:18 +0200 Subject: [PATCH] qml: don't auto-pop Scan TODO: handle cancel by signal too --- electrum/gui/qml/components/OpenChannel.qml | 1 + electrum/gui/qml/components/Scan.qml | 1 - electrum/gui/qml/components/Send.qml | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qml/components/OpenChannel.qml b/electrum/gui/qml/components/OpenChannel.qml index 2aec76108..a54e9331a 100644 --- a/electrum/gui/qml/components/OpenChannel.qml +++ b/electrum/gui/qml/components/OpenChannel.qml @@ -64,6 +64,7 @@ Pane { channelopener.nodeid = page.scanData node.text = channelopener.nodeid } + app.stack.pop() }) } } diff --git a/electrum/gui/qml/components/Scan.qml b/electrum/gui/qml/components/Scan.qml index d0cb4ea23..c04d390ee 100644 --- a/electrum/gui/qml/components/Scan.qml +++ b/electrum/gui/qml/components/Scan.qml @@ -24,7 +24,6 @@ Item { onFound: { scanPage.scanData = scanData scanPage.found() - app.stack.pop() } } diff --git a/electrum/gui/qml/components/Send.qml b/electrum/gui/qml/components/Send.qml index 260fe21bf..223c48256 100644 --- a/electrum/gui/qml/components/Send.qml +++ b/electrum/gui/qml/components/Send.qml @@ -84,10 +84,11 @@ Pane { page.onFound.connect(function() { var text = page.scanData if (bitcoin.verify_raw_tx(text)) { - app.stack.push(Qt.resolvedUrl('TxDetails.qml'), + app.stack.replace(Qt.resolvedUrl('TxDetails.qml'), { rawtx: text } ) } else { + app.stack.pop() invoice.recipient = text } })