| 586 | |
| 587 | |
| 588 | void BookmarkView::onTreeCollapse( wxTreeEvent& event ) { |
| 589 | |
| 590 | bool searchState = !searchKeywords.empty(); |
| 591 | |
| 592 | if (searchState) { |
| 593 | event.Skip(); |
| 594 | return; |
| 595 | } |
| 596 | |
| 597 | if (event.GetItem() == activeBranch) { |
| 598 | expandState["active"] = false; |
| 599 | } else if (event.GetItem() == bookmarkBranch) { |
| 600 | expandState["bookmark"] = false; |
| 601 | } else if (event.GetItem() == recentBranch) { |
| 602 | expandState["recent"] = false; |
| 603 | } else if (event.GetItem() == rangeBranch) { |
| 604 | expandState["range"] = false; |
| 605 | } else { |
| 606 | TreeViewItem *tvi = itemToTVI(event.GetItem()); |
| 607 | |
| 608 | if (tvi != nullptr) { |
| 609 | if (tvi->type == TreeViewItem::Type::TREEVIEW_ITEM_TYPE_GROUP) { |
| 610 | wxGetApp().getBookmarkMgr().setExpandState(tvi->groupName,false); |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | } |
| 615 | } |
| 616 | |
| 617 | |
| 618 | void BookmarkView::onTreeExpanded( wxTreeEvent& event ) { |
nothing calls this directly
no test coverage detected