summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index 9716da8..4f10897 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -230,6 +230,7 @@ void Dialog::addItems(const QList<Session*>& entries, int tab) {
return; // Invalid index
if (Config::isSet(Config::EXAM_MODE) && tab == TAB_NATIVE)
return; // Exam mode -- keep native sessions empty
+ ui->treeView->blockSignals(true);
if (tab != TAB_RECENT_COURSES) {
// If tab is not the recent courses tab, check the list for any recent sessions
auto prev = UserConfig::getLastSessions();
@@ -245,6 +246,7 @@ void Dialog::addItems(const QList<Session*>& entries, int tab) {
}
if (!matches.isEmpty()) {
addItems(matches, TAB_RECENT_COURSES);
+ ui->treeView->blockSignals(true);
}
}
}
@@ -253,8 +255,11 @@ void Dialog::addItems(const QList<Session*>& entries, int tab) {
if (tab == activeTab_) {
setListModel(this->model_[tab]);
}
+ ui->treeView->blockSignals(false);
model_[tab]->updateView();
- on_filterEdit_textChanged();
+ if (!ui->filterEdit->text().isEmpty()) {
+ on_filterEdit_textChanged();
+ }
if (tab != TAB_RECENT_COURSES) {
selectPreviousSession();
}
@@ -292,7 +297,6 @@ void Dialog::on_pushButtonStart_clicked() {
}
void Dialog::on_btnScreenSetup_clicked() {
- qDebug() << "Wooo";
QProcess::startDetached("beamergui", QStringList("-w"));
}