diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-05 09:44:15 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-05 09:56:55 +0200 |
commit | c8a3917089ec4ec96a7719cdab87260f266ee49e (patch) | |
tree | 68744e316f67be8215d8bfb21bef896889308f87 /src/qt/messagepage.cpp | |
parent | 4c9183e8bb6dc3faf80e301cf07c2d4d3abff405 (diff) |
signmessage: auto-select signature when field is focused/clicked
Diffstat (limited to 'src/qt/messagepage.cpp')
-rw-r--r-- | src/qt/messagepage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qt/messagepage.cpp b/src/qt/messagepage.cpp index d658119a08..aa7fdc5d91 100644 --- a/src/qt/messagepage.cpp +++ b/src/qt/messagepage.cpp @@ -26,6 +26,7 @@ MessagePage::MessagePage(QWidget *parent) : ui->setupUi(this); GUIUtil::setupAddressWidget(ui->signFrom, this); + ui->signature->installEventFilter(this); } MessagePage::~MessagePage() @@ -112,3 +113,14 @@ void MessagePage::on_clearButton_clicked() ui->message->clear(); ui->signature->clear(); } + +bool MessagePage::eventFilter(QObject *object, QEvent *event) +{ + if(object == ui->signature && (event->type() == QEvent::MouseButtonPress || + event->type() == QEvent::FocusIn)) + { + ui->signature->selectAll(); + return true; + } + return QDialog::eventFilter(object, event); +} |