From aa826153742ba414edccab1e90e8b46061a34fd2 Mon Sep 17 00:00:00 2001 From: selsta Date: Thu, 10 Jan 2019 11:08:57 +0100 Subject: [PATCH] merchant: fix payment tracker sorting If the History page wasn't opened once before opening the Merchant page, sorting was messed up. --- src/libwalletqt/Wallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 4aa442fa..85761e0b 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -507,6 +507,8 @@ TransactionHistorySortFilterModel *Wallet::historyModel() const m_historyModel->setTransactionHistory(this->history()); m_historySortFilterModel = new TransactionHistorySortFilterModel(w); m_historySortFilterModel->setSourceModel(m_historyModel); + m_historySortFilterModel->setSortRole(TransactionHistoryModel::TransactionBlockHeightRole); + m_historySortFilterModel->sort(0, Qt::DescendingOrder); } return m_historySortFilterModel;