summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-22 09:24:07 +0200
committerSimon Rettberg2019-07-22 09:24:07 +0200
commitfa4e91066468ef52b0374bf11f8ff3bf73e4918f (patch)
tree5a20e460aad06ca27a251f16e066b5f6976fb0ea
parent[WindowManager] Wait for openbox a bit longer, add comments (diff)
downloadvmchooser2-fa4e91066468ef52b0374bf11f8ff3bf73e4918f.tar.gz
vmchooser2-fa4e91066468ef52b0374bf11f8ff3bf73e4918f.tar.xz
vmchooser2-fa4e91066468ef52b0374bf11f8ff3bf73e4918f.zip
Fix: location-mode=EXCLUSIVE doesn't work
Seems this option was broken now for quite a while. The way it was handled was already messy, now this intrudoces more cruft... Fixes bwlp#1000678
-rw-r--r--src/dialog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index 388290d..9716da8 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -216,6 +216,8 @@ void Dialog::on_treeView_doubleClicked(const QModelIndex& index)
}
void Dialog::on_treeView_expanded(const QModelIndex& index) {
+ if (activeTab_ != TAB_ALL_VMS)
+ return;
SessionTreeItem* item =
static_cast<SessionTreeItem*>(index.internalPointer());
if (item->session() == nullptr && item->sectionType() != SECTION_FOR_LOCATION) {
@@ -618,6 +620,9 @@ void Dialog::onTabButtonChanged(int tab) {
// no valid button
return;
}
+ // Block this so it won't trigger the expand signal while refilling, which would
+ // interfere with LOCATION_EXCLUSIVE mode
+ ui->treeView->blockSignals(true);
// give focus to treeView
if (!ui->treeView->hasFocus()) {
@@ -638,6 +643,7 @@ void Dialog::onTabButtonChanged(int tab) {
setListModel(model_[tab]);
this->activeTab_ = tab;
+ ui->treeView->blockSignals(false);
/* get the first element ad select it */
selectFirstElement();