diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index cb5991adf1bf8..ba5871ae2b188 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -331,6 +331,13 @@ void RPCConsole::clear() tr("Type help for an overview of available commands.")), true); } +void RPCConsole::reject() +{ + // Ignore escape keypress if this is not a seperate window + if(windowType() != Qt::Widget) + QDialog::reject(); +} + void RPCConsole::message(int category, const QString &message, bool html) { QTime time = QTime::currentTime(); diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index e5da01546af66..f7a777205004b 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -47,6 +47,7 @@ private slots: public slots: void clear(); + void reject(); void message(int category, const QString &message, bool html = false); /** Set number of connections shown in the UI */ void setNumConnections(int count);