gui: Reject edit address dialog when key escape is pressed

This commit is contained in:
João Barbosa 2018-07-28 23:45:05 +01:00
parent f7a553177d
commit 4a43306a4f

View file

@ -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()