diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-07-28 23:45:05 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-07-30 23:13:04 +0100 |
commit | 4a43306a4f643cf0d356d5d5e16913541f1bc893 (patch) | |
tree | fd68f8a3d741face0c607a3e63eebb54e472e603 /src/qt/editaddressdialog.cpp | |
parent | f7a553177d4b969956bc04a0140fce34958971f5 (diff) |
gui: Reject edit address dialog when key escape is pressed
Diffstat (limited to 'src/qt/editaddressdialog.cpp')
-rw-r--r-- | src/qt/editaddressdialog.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp index f26a31158e..6e7520e018 100644 --- a/src/qt/editaddressdialog.cpp +++ b/src/qt/editaddressdialog.cpp @@ -39,6 +39,10 @@ EditAddressDialog::EditAddressDialog(Mode _mode, QWidget *parent) : mapper = new QDataWidgetMapper(this); mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); + + GUIUtil::ItemDelegate* delegate = new GUIUtil::ItemDelegate(mapper); + connect(delegate, &GUIUtil::ItemDelegate::keyEscapePressed, this, &EditAddressDialog::reject); + mapper->setItemDelegate(delegate); } EditAddressDialog::~EditAddressDialog() |