commit dd006b5087581fcdca599f3aed2a8fb5ad067552
parent 0f4b5abc158d46ac25fc2a976154004a2c705f2d
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 4 Oct 2017 14:33:51 +0200
Merge pull request #2982 from SomberNight/disallow_label_edit_headings
fix: editing labels in [QT GUI] Addresses tab for headings
Diffstat:
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/gui/qt/address_list.py b/gui/qt/address_list.py
@@ -158,3 +158,6 @@ class AddressList(MyTreeWidget):
run_hook('receive_menu', menu, addrs, self.wallet)
menu.exec_(self.viewport().mapToGlobal(position))
+ def on_permit_edit(self, item, column):
+ # labels for headings, e.g. "receiving" or "used" should not be editable
+ return item.childCount() == 0
diff --git a/plugins/labels/labels.py b/plugins/labels/labels.py
@@ -47,6 +47,8 @@ class LabelsPlugin(BasePlugin):
def set_label(self, wallet, item, label):
if not wallet in self.wallets:
return
+ if not item:
+ return
nonce = self.get_nonce(wallet)
wallet_id = self.wallets[wallet][2]
bundle = {"walletId": wallet_id,