fix: editing labels in [QT GUI] Addresses tab for headings resulted in errors
This commit is contained in:
@@ -158,3 +158,6 @@ class AddressList(MyTreeWidget):
|
|||||||
run_hook('receive_menu', menu, addrs, self.wallet)
|
run_hook('receive_menu', menu, addrs, self.wallet)
|
||||||
menu.exec_(self.viewport().mapToGlobal(position))
|
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
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ class LabelsPlugin(BasePlugin):
|
|||||||
def set_label(self, wallet, item, label):
|
def set_label(self, wallet, item, label):
|
||||||
if not wallet in self.wallets:
|
if not wallet in self.wallets:
|
||||||
return
|
return
|
||||||
|
if not item:
|
||||||
|
return
|
||||||
nonce = self.get_nonce(wallet)
|
nonce = self.get_nonce(wallet)
|
||||||
wallet_id = self.wallets[wallet][2]
|
wallet_id = self.wallets[wallet][2]
|
||||||
bundle = {"walletId": wallet_id,
|
bundle = {"walletId": wallet_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user