[LyX/master] Remove unneeded method
Juergen Spitzmueller
spitz at lyx.org
Mon Sep 18 08:18:47 UTC 2023
commit cd5a88029c5a06ce0eb8b8f31bdeaf49fb7963b6
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Mon Sep 18 11:36:16 2023 +0200
Remove unneeded method
which is also not available in Qt < 5.13, as it turns out.
---
src/frontends/qt/TocWidget.cpp | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/frontends/qt/TocWidget.cpp b/src/frontends/qt/TocWidget.cpp
index 0770cf3..da6d4f3 100644
--- a/src/frontends/qt/TocWidget.cpp
+++ b/src/frontends/qt/TocWidget.cpp
@@ -637,12 +637,9 @@ void TocWidget::collapseAllOthers(int const depth)
for (int i = size - 1; i >= 0; i--) {
QModelIndex index = indices[i];
if (tocTV->isExpanded(index)
- && !isAncestor(index, tocTV->currentIndex())) {
- if (depth < getItemDepth(index))
- tocTV->collapse(index);
- if (depth > 0 && index.parent() == QModelIndex())
- tocTV->expandRecursively(index, depth - 1);
- }
+ && !isAncestor(index, tocTV->currentIndex())
+ && depth < getItemDepth(index))
+ tocTV->collapse(index);
}
}
More information about the lyx-cvs
mailing list