diff options
author | Simon Rettberg | 2019-07-22 09:48:12 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-22 09:48:12 +0200 |
commit | b0272add79755195c1c05dc296c87b42c4427976 (patch) | |
tree | 04a4d42b196a37cacedd9298bc13401e8111442d /src | |
parent | Fix: location-mode=EXCLUSIVE doesn't work (diff) | |
download | vmchooser2-b0272add79755195c1c05dc296c87b42c4427976.tar.gz vmchooser2-b0272add79755195c1c05dc296c87b42c4427976.tar.xz vmchooser2-b0272add79755195c1c05dc296c87b42c4427976.zip |
Fix the fix for when fixing with tab 3 on start
Diffstat (limited to 'src')
-rw-r--r-- | src/dialog.cpp | 8 |
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")); } |