summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();