Browse Source

Qt: Sort transactions by date

Conflicted transactions can get stuck at the top. This fixes that.
0.13
Tyler Hardin 9 years ago
parent
commit
2d5603c7e8
  1. 2
      src/qt/overviewpage.cpp
  2. 2
      src/qt/transactionview.cpp

2
src/qt/overviewpage.cpp

@ -219,7 +219,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
filter->setDynamicSortFilter(true); filter->setDynamicSortFilter(true);
filter->setSortRole(Qt::EditRole); filter->setSortRole(Qt::EditRole);
filter->setShowInactive(false); filter->setShowInactive(false);
filter->sort(TransactionTableModel::Status, Qt::DescendingOrder); filter->sort(TransactionTableModel::Date, Qt::DescendingOrder);
ui->listTransactions->setModel(filter); ui->listTransactions->setModel(filter);
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress); ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);

2
src/qt/transactionview.cpp

@ -203,7 +203,7 @@ void TransactionView::setModel(WalletModel *model)
transactionView->setSelectionBehavior(QAbstractItemView::SelectRows); transactionView->setSelectionBehavior(QAbstractItemView::SelectRows);
transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection); transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection);
transactionView->setSortingEnabled(true); transactionView->setSortingEnabled(true);
transactionView->sortByColumn(TransactionTableModel::Status, Qt::DescendingOrder); transactionView->sortByColumn(TransactionTableModel::Date, Qt::DescendingOrder);
transactionView->verticalHeader()->hide(); transactionView->verticalHeader()->hide();
transactionView->setColumnWidth(TransactionTableModel::Status, STATUS_COLUMN_WIDTH); transactionView->setColumnWidth(TransactionTableModel::Status, STATUS_COLUMN_WIDTH);

Loading…
Cancel
Save