Browse Source

qt request_list: disable editing existing items

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 6 years ago
committed by ThomasV
parent
commit
828f07a1ff
  1. 3
      electrum/gui/qt/request_list.py

3
electrum/gui/qt/request_list.py

@ -66,7 +66,7 @@ class RequestList(MyTreeView):
def __init__(self, parent):
super().__init__(parent, self.create_menu,
stretch_column=self.Columns.DESCRIPTION,
editable_columns=[self.Columns.AMOUNT])
editable_columns=[])
self.setModel(QStandardItemModel(self))
self.setSortingEnabled(True)
self.update()
@ -151,6 +151,7 @@ class RequestList(MyTreeView):
date = format_time(lnaddr.date)
labels = [date, description, amount_str, pr_tooltips.get(status,'')]
items = [QStandardItem(e) for e in labels]
self.set_editability(items)
items[self.Columns.DATE].setIcon(read_QIcon("lightning.png"))
items[self.Columns.DATE].setData(REQUEST_TYPE_LN, ROLE_REQUEST_TYPE)
items[self.Columns.DATE].setData(key, ROLE_RHASH_OR_ADDR)

Loading…
Cancel
Save