mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-04-29 22:24:26 +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:
parent
de66fe4eda
commit
521302a962
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,15 +91,25 @@
|
||||
</item>
|
||||
<item row="0" column="0" colspan="5">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0" colspan="5">
|
||||
<item row="0" column="0" colspan="5">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="selectLogBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDelete">
|
||||
<property name="toolTip">
|
||||
<string>Delete the selected log</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Delete This</string>
|
||||
<string>&Delete Selected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -115,7 +125,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="5">
|
||||
<item row="1" column="0" colspan="5">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="wrapCheckbox">
|
||||
@ -166,7 +176,7 @@
|
||||
<string>Upload the log to the paste service configured in preferences</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upload</string>
|
||||
<string>&Upload</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -182,16 +192,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="5">
|
||||
<widget class="QComboBox" name="selectLogBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user