229 | @@ -229,8 +230,8 @@ void TransactionView::setModel(WalletModel *_model)
230 | transactionView->setAlternatingRowColors(true);
231 | transactionView->setSelectionBehavior(QAbstractItemView::SelectRows);
232 | transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection);
233 | + transactionView->horizontalHeader()->setSortIndicator(TransactionTableModel::Date, Qt::DescendingOrder);
234 | transactionView->setSortingEnabled(true);
235 | - transactionView->sortByColumn(TransactionTableModel::Date, Qt::DescendingOrder);
Note to reviewers: This call is removed to avoid sorting twice in a row. setSortingEnabled already sorts the data, and sortByColumn would repeat the same sort.
Confirmed by Qt docs:
Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order.