diff options
| author | Andrew C <[email protected]> | 2016-03-11 11:57:10 -0500 |
|---|---|---|
| committer | Andrew C <[email protected]> | 2016-03-11 13:19:19 -0500 |
| commit | 21e45a097e154be6be4a503f2181896c5f761385 (patch) | |
| tree | 73b82f0d92768c3536ea54406c7bd3a33d9f8a76 /src/qt/rpcconsole.cpp | |
| parent | Merge #7635: [Documentation] Add dependency info to test docs (diff) | |
| download | discoin-21e45a097e154be6be4a503f2181896c5f761385.tar.xz discoin-21e45a097e154be6be4a503f2181896c5f761385.zip | |
Fix history deletion bug after font change
The history is no longer cleared after the font size is changed
Diffstat (limited to 'src/qt/rpcconsole.cpp')
| -rw-r--r-- | src/qt/rpcconsole.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 4e2530ffa..90c555ccc 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -490,16 +490,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(); |