From ba82813c06e36cb2f0f7b34a4b669ea7f7348002 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 1 Apr 2023 14:05:58 +0200 Subject: [PATCH] qml InvoiceDialog: remove delete button, it only makes sense if you visit the list --- electrum/gui/qml/components/InvoiceDialog.qml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/electrum/gui/qml/components/InvoiceDialog.qml b/electrum/gui/qml/components/InvoiceDialog.qml index dc1bfa1fc..0518214f2 100644 --- a/electrum/gui/qml/components/InvoiceDialog.qml +++ b/electrum/gui/qml/components/InvoiceDialog.qml @@ -387,24 +387,12 @@ ElDialog { ButtonContainer { Layout.fillWidth: true - FlatButton { - Layout.fillWidth: true - Layout.preferredWidth: 1 - text: qsTr('Delete') - icon.source: '../../icons/delete.png' - visible: invoice_key != '' - onClicked: { - invoice.wallet.delete_invoice(invoice_key) - dialog.close() - } - } FlatButton { Layout.fillWidth: true Layout.preferredWidth: 1 text: qsTr('Save') icon.source: '../../icons/save.png' - visible: invoice_key == '' - enabled: invoice.canSave + enabled: invoice_key == '' && invoice.canSave onClicked: { app.stack.push(Qt.resolvedUrl('Invoices.qml')) if (invoice.amount.isEmpty) {