summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-01-23 18:14:11 +0100
committerGitHub <noreply@github.com>2021-01-23 18:14:11 +0100
commit14536009c08e876a6930469de35485d5f99c57e1 (patch)
tree2e7b67bd904c741baa6a5b80f98d9905d47dd80c /src/mainwindow.cpp
parent20a87c9cb966e418da055424670b9e661097441d (diff)
parent2ed3d4696b49f28fb39d4656113db3e45e3f9add (diff)
Merge pull request #1379 from Holt59/fix-loglist-startup
Fix empty loglist after startup.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a79aca2f..a25406dd 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1209,8 +1209,21 @@ void MainWindow::showEvent(QShowEvent *event)
m_WasVisible = true;
updateProblemsButton();
- // Notify plugin that the MO2 is ready:
+ // notify plugins that the MO2 is ready
m_PluginContainer.startPlugins(this);
+
+ // forces a log list refresh to display startup logs
+ //
+ // since the log list is not visible until this point, the automatic
+ // resize of columns seems to break the log list (since Qt 5.15.1 or
+ // 5.15.2), an make the list empty on startup (in debug the list is not
+ // empty because some logs are added after the log list becomes visible)
+ //
+ // the reset() forces a re-computation of the column size, thus properly
+ // the logs that are already in the log model
+ //
+ ui->logList->reset();
+ ui->logList->scrollToBottom();
}
}