aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-03-20 05:01:27 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-05-31 23:34:04 +0300
commit38eb37c0bd29b4cb825de905e8eec87636a5221b (patch)
treec2d2d3943d24eb7150db5794a8f9f4f5937294ca /src/qt/rpcconsole.cpp
parent0c32b9c5273a4933bda90aa9eb9b7eace6dcaa14 (diff)
qt, rpc: Do not accept command while executing another one
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp6
1 files changed, 6 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