diff options
author | Matt Corallo <matt@bluematt.me> | 2011-12-07 00:00:04 -0500 |
---|---|---|
committer | Matt Corallo <matt@bluematt.me> | 2012-01-05 00:29:28 -0500 |
commit | 9a93c4c02471fea7acb4882efaebaaefc1733466 (patch) | |
tree | 05504e635175636408d824e6aeb17bf7a69b8132 /src/qt/sendcoinsdialog.cpp | |
parent | 96d3bcb99690726d4c0e28355cc87c25e14f4c8d (diff) |
Automatically refocus on new SendCoinsEntrys and scroll to them.
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 762f27dfa6..6d32891172 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -11,6 +11,7 @@ #include <QMessageBox> #include <QLocale> #include <QTextDocument> +#include <QScrollBar> SendCoinsDialog::SendCoinsDialog(QWidget *parent) : QDialog(parent), @@ -188,6 +189,12 @@ SendCoinsEntry *SendCoinsDialog::addEntry() // Focus the field, so that entry can start immediately entry->clear(); + entry->setFocus(); + ui->scrollAreaWidgetContents->resize(ui->scrollAreaWidgetContents->sizeHint()); + QCoreApplication::instance()->processEvents(); + QScrollBar* bar = ui->scrollArea->verticalScrollBar(); + if (bar) + bar->setSliderPosition(bar->maximum()); return entry; } |