diff options
Diffstat (limited to 'src/qt/transactionview.cpp')
-rw-r--r-- | src/qt/transactionview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 1c427d6fe4..a0e7dd4e77 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -417,3 +417,13 @@ void TransactionView::dateRangeChanged() QDateTime(dateFrom->date()), QDateTime(dateTo->date()).addDays(1)); } + +void TransactionView::focusTransaction(const QModelIndex &idx) +{ + if(!transactionProxyModel) + return; + QModelIndex targetIdx = transactionProxyModel->mapFromSource(idx); + transactionView->scrollTo(targetIdx); + transactionView->setCurrentIndex(targetIdx); + transactionView->setFocus(); +} |