Skip to content

Commit 4a43306

Browse files
committed
gui: Reject edit address dialog when key escape is pressed
1 parent f7a5531 commit 4a43306

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/qt/editaddressdialog.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ EditAddressDialog::EditAddressDialog(Mode _mode, QWidget *parent) :
3939

4040
mapper = new QDataWidgetMapper(this);
4141
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
42+
43+
GUIUtil::ItemDelegate* delegate = new GUIUtil::ItemDelegate(mapper);
44+
connect(delegate, &GUIUtil::ItemDelegate::keyEscapePressed, this, &EditAddressDialog::reject);
45+
mapper->setItemDelegate(delegate);
4246
}
4347

4448
EditAddressDialog::~EditAddressDialog()

0 commit comments

Comments
 (0)