From e03fcf9c3f610e8ece9ae02a32f60b7bd10ce5be Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 8 Feb 2024 16:06:58 +0100 Subject: [PATCH] Gui: fixes #12043: Treeview doesn't work if not in combo view mode --- src/Gui/PreferencePages/DlgSettingsGeneral.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Gui/PreferencePages/DlgSettingsGeneral.cpp b/src/Gui/PreferencePages/DlgSettingsGeneral.cpp index 7957022c79..d78f4c1bec 100644 --- a/src/Gui/PreferencePages/DlgSettingsGeneral.cpp +++ b/src/Gui/PreferencePages/DlgSettingsGeneral.cpp @@ -461,6 +461,19 @@ void DlgSettingsGeneral::saveDockWindowVisibility() bool treeView = hGrp->GetGroup("TreeView")->GetBool("Enabled", false); bool propertyView = hGrp->GetGroup("PropertyView")->GetBool("Enabled", false); bool comboView = hGrp->GetGroup("ComboView")->GetBool("Enabled", true); + + int index = -1; + if (propertyView || treeView) { + index = 1; + } + else if (comboView) { + index = 0; + } + + if (index != ui->treeMode->currentIndex()) { + requireRestart(); + } + switch (ui->treeMode->currentIndex()) { case 0: comboView = true;