diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/rpcconsole.cpp | 6 | ||||
-rw-r--r-- | src/qt/rpcconsole.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 378328d1b2..4fba7ccd04 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -776,15 +776,15 @@ void RPCConsole::setFontSize(int newSize) // clear console (reset icon sizes, default stylesheet) and re-add the content float oldPosFactor = 1.0 / ui->messagesWidget->verticalScrollBar()->maximum() * ui->messagesWidget->verticalScrollBar()->value(); - clear(); + clear(/* keep_prompt */ true); ui->messagesWidget->setHtml(str); ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor * ui->messagesWidget->verticalScrollBar()->maximum()); } -void RPCConsole::clear() +void RPCConsole::clear(bool keep_prompt) { ui->messagesWidget->clear(); - ui->lineEdit->clear(); + if (!keep_prompt) ui->lineEdit->clear(); ui->lineEdit->setFocus(); // Add smoothly scaled icon images. diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index b686154818..2f8cae6161 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -99,7 +99,7 @@ private Q_SLOTS: void updateDetailWidget(); public Q_SLOTS: - void clear(); + void clear(bool keep_prompt = false); void fontBigger(); void fontSmaller(); void setFontSize(int newSize); |