aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qt/rpcconsole.cpp6
-rw-r--r--src/qt/rpcconsole.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index f9a53e8d60..c762f2b9c8 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -949,6 +949,10 @@ void RPCConsole::on_lineEdit_returnPressed()
return;
}
+ if (m_is_executing) {
+ return;
+ }
+
ui->lineEdit->clear();
#ifdef ENABLE_WALLET
@@ -967,6 +971,7 @@ void RPCConsole::on_lineEdit_returnPressed()
message(CMD_REQUEST, QString::fromStdString(strFilteredCmd));
//: A console message indicating an entered command is currently being executed.
message(CMD_REPLY, tr("Executing…"));
+ m_is_executing = true;
Q_EMIT cmdRequest(cmd, m_last_wallet_model);
cmd = QString::fromStdString(strFilteredCmd);
@@ -1018,6 +1023,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 55a1decceb..75f466642b 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -166,6 +166,7 @@ private:
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();