mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Move delete buttons to the same line & set model to nullptr before adding lines
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
@ -204,6 +204,7 @@ void OtherLogsPage::on_btnReload_clicked()
|
||||
if (content.back() == '\n')
|
||||
content = content.remove(content.size() - 1, 1);
|
||||
ui->text->clear();
|
||||
ui->text->setModel(nullptr);
|
||||
m_model->clear();
|
||||
for (auto& line : content.split('\n')) {
|
||||
MessageLevel::Enum level = MessageLevel::Unknown;
|
||||
@ -221,6 +222,8 @@ void OtherLogsPage::on_btnReload_clicked()
|
||||
|
||||
m_model->append(level, line);
|
||||
}
|
||||
ui->text->setModel(m_proxy);
|
||||
ui->text->scrollToBottom();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user