1
0

history: fix displayed STATUS sort order

Ref: #9969
Ref: #9999
This commit is contained in:
наб
2025-07-01 23:29:46 +02:00
parent 38f83940a0
commit 2e68d25187

View File

@@ -81,7 +81,7 @@ class HistorySortModel(QSortFilterProxyModel):
col = index.column() col = index.column()
if col == HistoryColumns.STATUS: if col == HistoryColumns.STATUS:
# respect sort order of self.transactions (wallet.get_full_history) # respect sort order of self.transactions (wallet.get_full_history)
return -index.row() return index.row()
else: else:
node = index.internalPointer() node = index.internalPointer()
return node.sort_keys[col] return node.sort_keys[col]
@@ -507,7 +507,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
self.period_combo.addItems([_('All'), _('Custom')]) self.period_combo.addItems([_('All'), _('Custom')])
self.period_combo.activated.connect(self.on_combo) self.period_combo.activated.connect(self.on_combo)
self.wallet = self.main_window.wallet # type: Abstract_Wallet self.wallet = self.main_window.wallet # type: Abstract_Wallet
self.sortByColumn(HistoryColumns.STATUS, Qt.SortOrder.AscendingOrder) self.sortByColumn(HistoryColumns.STATUS, Qt.SortOrder.DescendingOrder)
self.setRootIsDecorated(True) self.setRootIsDecorated(True)
self.header().setStretchLastSection(False) self.header().setStretchLastSection(False)
for col in HistoryColumns: for col in HistoryColumns: