Fix double load (again lol)

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2025-04-18 21:24:25 +01:00
parent d5db974008
commit 01efd5b5d8
No known key found for this signature in database
GPG Key ID: 5E39D70B4C93C38E

View File

@ -132,20 +132,25 @@ void OtherLogsPage::closedImpl()
void OtherLogsPage::populateSelectLogBox()
{
QString prevCurrentFile = m_currentFile;
const QString prevCurrentFile = m_currentFile;
ui->selectLogBox->blockSignals(true);
ui->selectLogBox->clear();
ui->selectLogBox->addItems(getPaths());
ui->selectLogBox->blockSignals(false);
if (!prevCurrentFile.isEmpty()) {
const int index = ui->selectLogBox->findText(prevCurrentFile);
if (index != -1) {
ui->selectLogBox->setCurrentIndex(index);
setControlsEnabled(true);
return;
} else {
setControlsEnabled(false);
}
}
on_selectLogBox_currentIndexChanged(ui->selectLogBox->currentIndex());
}
void OtherLogsPage::on_selectLogBox_currentIndexChanged(const int index)