Merge branch 'master' of github.com:spesmilo/electrum
This commit is contained in:
@@ -273,22 +273,27 @@ class HistoryModel(QAbstractItemModel, PrintError):
|
||||
self.dataChanged.emit(idx, idx, [Qt.DisplayRole, Qt.ForegroundRole])
|
||||
|
||||
def update_tx_mined_status(self, tx_hash: str, tx_mined_info: TxMinedInfo):
|
||||
self.tx_status_cache[tx_hash] = self.parent.wallet.get_tx_status(tx_hash, tx_mined_info)
|
||||
try:
|
||||
row = self.transactions.pos_from_key(tx_hash)
|
||||
tx_item = self.transactions[tx_hash]
|
||||
except KeyError:
|
||||
return
|
||||
self.tx_status_cache[tx_hash] = self.parent.wallet.get_tx_status(tx_hash, tx_mined_info)
|
||||
tx_item.update({
|
||||
'confirmations': tx_mined_info.conf,
|
||||
'timestamp': tx_mined_info.timestamp,
|
||||
'txpos_in_block': tx_mined_info.txpos,
|
||||
})
|
||||
topLeft = self.createIndex(row, 0)
|
||||
bottomRight = self.createIndex(row, len(HistoryColumns) - 1)
|
||||
self.dataChanged.emit(topLeft, bottomRight)
|
||||
|
||||
def on_fee_histogram(self):
|
||||
for tx_hash, tx_item in self.transactions.items():
|
||||
for tx_hash, tx_item in list(self.transactions.items()):
|
||||
tx_mined_info = self.tx_mined_info_from_tx_item(tx_item)
|
||||
if tx_mined_info.conf > 0:
|
||||
# note: we could actually break here if we wanted to rely on the order of txns in self.transactions
|
||||
continue
|
||||
self.tx_status_cache[tx_hash] = self.parent.wallet.get_tx_status(tx_hash, tx_mined_info)
|
||||
self.update_tx_mined_status(tx_hash, tx_mined_info)
|
||||
|
||||
def headerData(self, section: int, orientation: Qt.Orientation, role: Qt.ItemDataRole):
|
||||
@@ -556,6 +561,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
|
||||
menu.addAction(_("Remove"), lambda: self.remove_local_tx(tx_hash))
|
||||
menu.addAction(_("Copy {}").format(column_title), lambda: self.parent.app.clipboard().setText(column_data))
|
||||
for c in self.editable_columns:
|
||||
if self.isColumnHidden(c): continue
|
||||
label = self.hm.headerData(c, Qt.Horizontal, Qt.DisplayRole)
|
||||
# TODO use siblingAtColumn when min Qt version is >=5.11
|
||||
persistent = QPersistentModelIndex(org_idx.sibling(org_idx.row(), c))
|
||||
|
||||
Reference in New Issue
Block a user