Remove unneeded method

which is also not available in Qt < 5.13, as it turns out.
This commit is contained in:
Juergen Spitzmueller 2023-09-18 11:36:16 +02:00
parent b13685d9bb
commit cd5a88029c

View File

@ -637,12 +637,9 @@ void TocWidget::collapseAllOthers(int const depth)
for (int i = size - 1; i >= 0; i--) { for (int i = size - 1; i >= 0; i--) {
QModelIndex index = indices[i]; QModelIndex index = indices[i];
if (tocTV->isExpanded(index) if (tocTV->isExpanded(index)
&& !isAncestor(index, tocTV->currentIndex())) { && !isAncestor(index, tocTV->currentIndex())
if (depth < getItemDepth(index)) && depth < getItemDepth(index))
tocTV->collapse(index); tocTV->collapse(index);
if (depth > 0 && index.parent() == QModelIndex())
tocTV->expandRecursively(index, depth - 1);
}
} }
} }