aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-05-12 13:19:44 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-05-12 15:32:22 +0200
commit3ef1f41550d5e9ba032dcc5e550e5f85f7e6aa07 (patch)
tree539fbe8f11a60658365969b759aa44f82bc73e94 /src/qt/transactionview.cpp
parent97ec4e50b128c201c82dd76b28ab44508d85e94f (diff)
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();
+}