in-place labels update (fix #1841)
This commit is contained in:
parent
cefae0d76a
commit
c90b2497f5
|
@ -95,6 +95,15 @@ class HistoryList(MyTreeWidget):
|
||||||
if current_tx == tx_hash:
|
if current_tx == tx_hash:
|
||||||
self.setCurrentItem(item)
|
self.setCurrentItem(item)
|
||||||
|
|
||||||
|
def update_labels(self):
|
||||||
|
root = self.invisibleRootItem()
|
||||||
|
child_count = root.childCount()
|
||||||
|
for i in range(child_count):
|
||||||
|
item = root.child(i)
|
||||||
|
txid = str(item.data(0, Qt.UserRole).toString())
|
||||||
|
label = self.wallet.get_label(txid)
|
||||||
|
item.setText(3, label)
|
||||||
|
|
||||||
def update_item(self, tx_hash, height, conf, timestamp):
|
def update_item(self, tx_hash, height, conf, timestamp):
|
||||||
status, status_str = self.wallet.get_tx_status(tx_hash, height, conf, timestamp)
|
status, status_str = self.wallet.get_tx_status(tx_hash, height, conf, timestamp)
|
||||||
icon = QIcon(":icons/" + TX_ICONS[status])
|
icon = QIcon(":icons/" + TX_ICONS[status])
|
||||||
|
|
|
@ -472,7 +472,7 @@ class MyTreeWidget(QTreeWidget):
|
||||||
key = str(item.data(0, Qt.UserRole).toString())
|
key = str(item.data(0, Qt.UserRole).toString())
|
||||||
text = unicode(item.text(column))
|
text = unicode(item.text(column))
|
||||||
self.parent.wallet.set_label(key, text)
|
self.parent.wallet.set_label(key, text)
|
||||||
self.parent.history_list.update()
|
self.parent.history_list.update_labels()
|
||||||
self.parent.update_completions()
|
self.parent.update_completions()
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
|
|
Loading…
Reference in New Issue