Qt: list requests and invoices in descending order

This commit is contained in:
ThomasV 2020-03-03 11:25:54 +01:00
parent abb0760616
commit 94443ebe5e
2 changed files with 2 additions and 2 deletions

View file

@ -128,7 +128,7 @@ class InvoiceList(MyTreeView):
self.selectionModel().select(self.model().index(0,0), QItemSelectionModel.SelectCurrent)
# sort requests by date
self.sortByColumn(self.Columns.DATE, Qt.AscendingOrder)
self.sortByColumn(self.Columns.DATE, Qt.DescendingOrder)
# hide list if empty
if self.parent.isVisible():
b = self.model().rowCount() > 0

View file

@ -151,7 +151,7 @@ class RequestList(MyTreeView):
self.model().insertRow(self.model().rowCount(), items)
self.filter()
# sort requests by date
self.sortByColumn(self.Columns.DATE, Qt.AscendingOrder)
self.sortByColumn(self.Columns.DATE, Qt.DescendingOrder)
# hide list if empty
if self.parent.isVisible():
b = self.model().rowCount() > 0