diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-13 02:53:25 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-13 02:53:25 -0700 |
commit | 82f66082b986132ab9ef039afa3c1e116dcbb36b (patch) | |
tree | 2f138ae6ef5d7fe0389a62e61081955beccf415b /src/qt/transactionview.cpp | |
parent | 3986a05c62c08f3b51067de196fd1f9b3b1ffa83 (diff) | |
parent | 3ef1f41550d5e9ba032dcc5e550e5f85f7e6aa07 (diff) |
Merge pull request #1270 from laanwj/2012_05_overviewpage2
When a transaction is clicked on overview page, focus it on history page
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(); +} |