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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user