MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / onTreeCollapse

Method onTreeCollapse

src/forms/Bookmark/BookmarkView.cpp:588–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586
587
588void 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
618void BookmarkView::onTreeExpanded( wxTreeEvent& event ) {

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
setExpandStateMethod · 0.45

Tested by

no test coverage detected