diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 242d6c3b5f9..b1a9ee4684c 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -922,6 +922,10 @@ void RPCConsole::on_lineEdit_returnPressed() return; } + if (m_is_executing) { + return; + } + ui->lineEdit->clear(); #ifdef ENABLE_WALLET @@ -940,6 +944,7 @@ void RPCConsole::on_lineEdit_returnPressed() message(CMD_REQUEST, QString::fromStdString(strFilteredCmd)); //: A message in the GUI console while an entered command being executed. message(CMD_REPLY, tr("Executing…")); + m_is_executing = true; Q_EMIT cmdRequest(cmd, m_last_wallet_model); cmd = QString::fromStdString(strFilteredCmd); @@ -991,6 +996,7 @@ void RPCConsole::startExecutor() ui->messagesWidget->undo(); message(category, command); scrollToEnd(); + m_is_executing = false; }); // Requests from this object must go to executor diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 5182d60a0d7..1000e4e61fc 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -165,6 +165,7 @@ public Q_SLOTS: QCompleter *autoCompleter = nullptr; QThread thread; WalletModel* m_last_wallet_model{nullptr}; + bool m_is_executing{false}; /** Update UI with latest network info from model. */ void updateNetworkState();