summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dialog.cpp6
1 files 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<Session*>& 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);