From e0c03c3a187f0b2d764cf1bab5a804b0dc5b62e3 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 18 Oct 2019 13:19:18 +0200 Subject: Always check session validity, not just if user has a config file... --- src/dialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dialog.cpp b/src/dialog.cpp index e43d950..c6df761 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -243,14 +243,16 @@ void Dialog::addItems(const QList& entries, int tab) { || prev.contains(it->shortDescription())) { matches.append(it); } - // Also check for validity - it->checkCanRun(); } if (!matches.isEmpty()) { addItems(matches, TAB_RECENT_COURSES); ui->treeView->blockSignals(true); } } + for (auto it : entries) { + // Also check for validity + it->checkCanRun(); + } } this->model_[tab]->addItems(entries); tabs_[tab]->setEnabled(this->model_[tab]->rowCount() != 0); -- cgit v1.2.3-55-g7522