aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qt/messagepage.cpp12
-rw-r--r--src/qt/messagepage.h3
2 files changed, 15 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);
+}
diff --git a/src/qt/messagepage.h b/src/qt/messagepage.h
index b5a38166da..d668ae98d0 100644
--- a/src/qt/messagepage.h
+++ b/src/qt/messagepage.h
@@ -23,6 +23,9 @@ public:
void setAddress(QString);
+protected:
+ bool eventFilter(QObject *object, QEvent *event);
+
private:
Ui::MessagePage *ui;
WalletModel *model;