1
0

Don't refresh whilst editing!

It's long been a pet peeve of mine that whilst editing a label,
something would cause Electrum to refresh the widget, such as
an incoming tx or a new block, and you'd lose your edits.
This changes MyTreeWidget so that, if editing, updates are
deferred until editing finishes.
This commit is contained in:
Neil Booth
2015-09-09 09:36:35 +09:00
parent 544b829f6e
commit 0371a3dc32
4 changed files with 60 additions and 42 deletions

View File

@@ -55,8 +55,11 @@ class HistoryWidget(MyTreeWidget):
icon = QIcon(":icons/confirmed.png")
return icon, time_str
def update(self, h):
def on_update(self):
self.wallet = self.parent.wallet
domain = self.wallet.get_account_addresses(self.parent.current_account)
h = self.wallet.get_history(domain)
item = self.currentItem()
current_tx = item.data(0, Qt.UserRole).toString() if item else None
self.clear()