diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-03-14 09:24:32 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-03-14 09:24:39 +0100 |
commit | b24266c20748b871dd39243bc1488ce1070ad331 (patch) | |
tree | df13463ad868245dfdc81576788b0af6c390c902 /src | |
parent | 3798e5de334c3deb5f71302b782f6b8fbd5087f1 (diff) | |
parent | 21e45a097e154be6be4a503f2181896c5f761385 (diff) |
Merge #7668: Fix history deletion bug after font size change
21e45a0 Fix history deletion bug after font change (Andrew C)
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/rpcconsole.cpp | 11 | ||||
-rw-r--r-- | src/qt/rpcconsole.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 06fa85c34b..e8ee3042db 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -503,16 +503,19 @@ 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(false); ui->messagesWidget->setHtml(str); ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor * ui->messagesWidget->verticalScrollBar()->maximum()); } -void RPCConsole::clear() +void RPCConsole::clear(bool clearHistory) { ui->messagesWidget->clear(); - history.clear(); - historyPtr = 0; + if(clearHistory) + { + history.clear(); + historyPtr = 0; + } ui->lineEdit->clear(); ui->lineEdit->setFocus(); diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index ad10ec12aa..2923587bc8 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -78,7 +78,7 @@ private Q_SLOTS: void clearSelectedNode(); public Q_SLOTS: - void clear(); + void clear(bool clearHistory = true); void fontBigger(); void fontSmaller(); void setFontSize(int newSize); |