Permalink
Browse files

Merge #7668: Fix history deletion bug after font size change

21e45a0 Fix history deletion bug after font change (Andrew C)
  • Loading branch information...
jonasschnelli committed Mar 14, 2016
2 parents 3798e5d + 21e45a0 commit b24266c20748b871dd39243bc1488ce1070ad331
Showing with 8 additions and 5 deletions.
  1. +7 −4 src/qt/rpcconsole.cpp
  2. +1 −1 src/qt/rpcconsole.h
View
@@ -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();
View
@@ -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);

0 comments on commit b24266c

Please sign in to comment.