[LyX/master] Fix outliner tree depth (#13098)

Juergen Spitzmueller spitz at lyx.org
Thu Sep 19 08:01:11 UTC 2024


commit f5306b7054acc903fe0946f12d45cf61cedad7f1
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Sep 19 10:00:39 2024 +0200

    Fix outliner tree depth (#13098)
---
 src/frontends/qt/TocWidget.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/frontends/qt/TocWidget.cpp b/src/frontends/qt/TocWidget.cpp
index 04fd599857..dc9667ca17 100644
--- a/src/frontends/qt/TocWidget.cpp
+++ b/src/frontends/qt/TocWidget.cpp
@@ -501,8 +501,7 @@ void TocWidget::updateView()
 	if (tocTV->model() != toc_model) {
 		tocTV->setModel(toc_model);
 		tocTV->setEditTriggers(QAbstractItemView::NoEditTriggers);
-		if (persistent_)
-			setTreeDepth(depth_);
+		setTreeDepth(depth_);
 	}
 
 	sortCB->blockSignals(true);
@@ -709,8 +708,7 @@ void TocWidget::init(QString const & str)
 	typeCO->setCurrentIndex(new_index);
 	typeCO->blockSignals(false);
 	updateViewNow();
-	if (persistent_)
-		setTreeDepth(depth_);
+	setTreeDepth(depth_);
 }
 
 } // namespace frontend


More information about the lyx-cvs mailing list