summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-10-18 13:19:18 +0200
committerSimon Rettberg2019-10-18 13:19:18 +0200
commite0c03c3a187f0b2d764cf1bab5a804b0dc5b62e3 (patch)
treec768d359ae98b2b5b82b33d4ac8f49dde7bc5bd4
parent*session.cpp: give me those stars! (diff)
downloadvmchooser2-e0c03c3a187f0b2d764cf1bab5a804b0dc5b62e3.tar.gz
vmchooser2-e0c03c3a187f0b2d764cf1bab5a804b0dc5b62e3.tar.xz
vmchooser2-e0c03c3a187f0b2d764cf1bab5a804b0dc5b62e3.zip
Always check session validity, not just if user has a config file...
-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);