From 2ed3d4696b49f28fb39d4656113db3e45e3f9add Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Thu, 21 Jan 2021 19:11:37 +0100 Subject: Add comment to explain the reset() on the log list. --- src/mainwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5b4e87ab..a25406dd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1213,6 +1213,15 @@ void MainWindow::showEvent(QShowEvent *event) 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(); } -- cgit v1.3.1