mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 04:33:59 +01:00
gui: Reject options dialog when key escape is pressed
This commit is contained in:
@@ -115,6 +115,10 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
|
|||||||
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
|
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
|
||||||
mapper->setOrientation(Qt::Vertical);
|
mapper->setOrientation(Qt::Vertical);
|
||||||
|
|
||||||
|
GUIUtil::ItemDelegate* delegate = new GUIUtil::ItemDelegate(mapper);
|
||||||
|
connect(delegate, &GUIUtil::ItemDelegate::keyEscapePressed, this, &OptionsDialog::reject);
|
||||||
|
mapper->setItemDelegate(delegate);
|
||||||
|
|
||||||
/* setup/change UI elements when proxy IPs are invalid/valid */
|
/* setup/change UI elements when proxy IPs are invalid/valid */
|
||||||
ui->proxyIp->setCheckValidator(new ProxyAddressValidator(parent));
|
ui->proxyIp->setCheckValidator(new ProxyAddressValidator(parent));
|
||||||
ui->proxyIpTor->setCheckValidator(new ProxyAddressValidator(parent));
|
ui->proxyIpTor->setCheckValidator(new ProxyAddressValidator(parent));
|
||||||
|
|||||||
Reference in New Issue
Block a user