Merge pull request #2982 from SomberNight/disallow_label_edit_headings

fix: editing labels in [QT GUI] Addresses tab for headings
This commit is contained in:
ThomasV 2017-10-04 14:33:51 +02:00 committed by GitHub
commit dd006b5087
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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,