Skip to content

Commit

Permalink
Ignore close event until dlt loading is complete
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Kopp <vifactor@gmail.com>
  • Loading branch information
vifactor committed Nov 19, 2024
1 parent abb2ff4 commit 5d0eeef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
settingsDlg->writeSettings(this);
if(true == isSearchOngoing)
{
qDebug() << "Ignoring close event";
event->ignore();
}
else if(settings->tempCloseWithoutAsking || outputfile.size() == 0)
Expand Down Expand Up @@ -2062,6 +2063,8 @@ void MainWindow::reloadLogFileFinishFilter()
// process getLogInfoMessages
if(( dltIndexer->getMode() == DltFileIndexer::modeIndexAndFilter) && settings->updateContextLoadingFile)
{
qDebug() << "Populating ECUs tree";
isSearchOngoing = true;
QThreadPool::globalInstance()->start([this] {
const QList<int>& msgIndexList = dltIndexer->getGetLogInfoList();

Expand All @@ -2070,7 +2073,9 @@ void MainWindow::reloadLogFileFinishFilter()
if (qfile.getMsg(msgIndex, msg))
contextLoadingFile(msg);
}
isSearchOngoing = false;
});
qDebug() << "Populating ECUs end.";
}

// reconnect ecus again
Expand Down

0 comments on commit 5d0eeef

Please sign in to comment.