|
|
@ -490,16 +490,19 @@ void RPCConsole::setFontSize(int newSize) |
|
|
|
|
|
|
|
|
|
|
|
// clear console (reset icon sizes, default stylesheet) and re-add the content
|
|
|
|
// clear console (reset icon sizes, default stylesheet) and re-add the content
|
|
|
|
float oldPosFactor = 1.0 / ui->messagesWidget->verticalScrollBar()->maximum() * ui->messagesWidget->verticalScrollBar()->value(); |
|
|
|
float oldPosFactor = 1.0 / ui->messagesWidget->verticalScrollBar()->maximum() * ui->messagesWidget->verticalScrollBar()->value(); |
|
|
|
clear(); |
|
|
|
clear(false); |
|
|
|
ui->messagesWidget->setHtml(str); |
|
|
|
ui->messagesWidget->setHtml(str); |
|
|
|
ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor * ui->messagesWidget->verticalScrollBar()->maximum()); |
|
|
|
ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor * ui->messagesWidget->verticalScrollBar()->maximum()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RPCConsole::clear() |
|
|
|
void RPCConsole::clear(bool clearHistory) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ui->messagesWidget->clear(); |
|
|
|
ui->messagesWidget->clear(); |
|
|
|
|
|
|
|
if(clearHistory) |
|
|
|
|
|
|
|
{ |
|
|
|
history.clear(); |
|
|
|
history.clear(); |
|
|
|
historyPtr = 0; |
|
|
|
historyPtr = 0; |
|
|
|
|
|
|
|
} |
|
|
|
ui->lineEdit->clear(); |
|
|
|
ui->lineEdit->clear(); |
|
|
|
ui->lineEdit->setFocus(); |
|
|
|
ui->lineEdit->setFocus(); |
|
|
|
|
|
|
|
|
|
|
|