aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-05-13 02:53:25 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2012-05-13 02:53:25 -0700
commit82f66082b986132ab9ef039afa3c1e116dcbb36b (patch)
tree2f138ae6ef5d7fe0389a62e61081955beccf415b /src/qt/transactionview.cpp
parent3986a05c62c08f3b51067de196fd1f9b3b1ffa83 (diff)
parent3ef1f41550d5e9ba032dcc5e550e5f85f7e6aa07 (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.cpp10
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();
+}