Skip to content

Commit

Permalink
fix toc treeitem collapse ignored on tab switch (fix #1721 and #3055)
Browse files Browse the repository at this point in the history
  • Loading branch information
misaz authored and kjk committed Dec 29, 2023
1 parent c7b189c commit a73ec87
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/TableOfContents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ static void GetLeftRightCounts(TocItem* node, int& l2r, int& r2l) {

static void SetInitialExpandState(TocItem* item, Vec<int>& tocState) {
while (item) {
if (tocState.Contains(item->id)) {
item->isOpenToggled = true;
}
item->isOpenToggled = tocState.Contains(item->id);
SetInitialExpandState(item->child, tocState);
item = item->next;
}
Expand Down

0 comments on commit a73ec87

Please sign in to comment.