mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
qt requests/invoices: use TreeView.sortByColumn instead of model.sort
sort the view, not the model This way, qt will display the icon indicating the sort order on the relevant column header.
This commit is contained in:
parent
9f9b0954e2
commit
d81110014e
2 changed files with 2 additions and 2 deletions
|
@ -129,7 +129,7 @@ class InvoiceList(MyTreeView):
|
|||
|
||||
self.selectionModel().select(self.model().index(0,0), QItemSelectionModel.SelectCurrent)
|
||||
# sort requests by date
|
||||
self.model().sort(self.Columns.DATE)
|
||||
self.sortByColumn(self.Columns.DATE, Qt.AscendingOrder)
|
||||
# hide list if empty
|
||||
if self.parent.isVisible():
|
||||
b = self.model().rowCount() > 0
|
||||
|
|
|
@ -138,7 +138,7 @@ class RequestList(MyTreeView):
|
|||
self.model().insertRow(self.model().rowCount(), items)
|
||||
self.filter()
|
||||
# sort requests by date
|
||||
self.model().sort(self.Columns.DATE)
|
||||
self.sortByColumn(self.Columns.DATE, Qt.AscendingOrder)
|
||||
# hide list if empty
|
||||
if self.parent.isVisible():
|
||||
b = self.model().rowCount() > 0
|
||||
|
|
Loading…
Add table
Reference in a new issue