Qt: make display of lists more stable.
Use refresh_row() for address, utxo and contact lists. Replace unneeded calls to update_tabs() with refresh_tabs() Fix right-click menu after selecting multiple addresses.
This commit is contained in:
@@ -50,6 +50,7 @@ class ContactList(MyTreeView):
|
||||
filter_columns = [Columns.NAME, Columns.ADDRESS]
|
||||
|
||||
ROLE_CONTACT_KEY = Qt.UserRole + 1000
|
||||
key_role = ROLE_CONTACT_KEY
|
||||
|
||||
def __init__(self, parent):
|
||||
super().__init__(parent, self.create_menu,
|
||||
@@ -58,6 +59,7 @@ class ContactList(MyTreeView):
|
||||
self.setModel(QStandardItemModel(self))
|
||||
self.setSelectionMode(QAbstractItemView.ExtendedSelection)
|
||||
self.setSortingEnabled(True)
|
||||
self.std_model = self.model()
|
||||
self.update()
|
||||
|
||||
def on_edited(self, idx, edit_key, *, text):
|
||||
@@ -121,6 +123,10 @@ class ContactList(MyTreeView):
|
||||
self.filter()
|
||||
run_hook('update_contacts_tab', self)
|
||||
|
||||
def refresh_row(self, key):
|
||||
# nothing to update here
|
||||
pass
|
||||
|
||||
def get_edit_key_from_coordinate(self, row, col):
|
||||
if col != self.Columns.NAME:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user