mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
Fix history deletion bug after font change
The history is no longer cleared after the font size is changed
This commit is contained in:
parent
0fa88ef784
commit
21e45a097e
2 changed files with 8 additions and 5 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ private Q_SLOTS:
|
|||
void clearSelectedNode();
|
||||
|
||||
public Q_SLOTS:
|
||||
void clear();
|
||||
void clear(bool clearHistory = true);
|
||||
void fontBigger();
|
||||
void fontSmaller();
|
||||
void setFontSize(int newSize);
|
||||
|
|
Loading…
Reference in a new issue