aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-17 14:29:37 +0300
committerJarol Rodriguez <jarolrod@tutanota.com>2021-04-22 22:30:12 -0400
commit7962e0dde8bbd0fa3dd702e2224774f1edaadcb6 (patch)
treeba48f090528b008f3d171e6c28ccf2f4933475df /src/qt/rpcconsole.cpp
parentd2cc3390054616c73f72a59f864700f6de14067b (diff)
qt: Do not clear console prompt when font resizing
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp6
1 files changed, 3 insertions, 3 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.