From b0272add79755195c1c05dc296c87b42c4427976 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 Jul 2019 09:48:12 +0200 Subject: Fix the fix for when fixing with tab 3 on start --- src/dialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/dialog.cpp') 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& 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& entries, int tab) { } if (!matches.isEmpty()) { addItems(matches, TAB_RECENT_COURSES); + ui->treeView->blockSignals(true); } } } @@ -253,8 +255,11 @@ void Dialog::addItems(const QList& 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")); } -- cgit v1.2.3-55-g7522