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

Method onTreeSelect

src/forms/Bookmark/BookmarkView.cpp:1113–1159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111
1112
1113void BookmarkView::onTreeSelect( wxTreeEvent& event ) {
1114
1115 if (skipEvents()) {
1116 return;
1117 }
1118
1119 wxTreeItemId itm = event.GetItem();
1120 auto* tvi = dynamic_cast<TreeViewItem*>(m_treeView->GetItemData(itm));
1121
1122 if (!tvi) {
1123
1124 if (itm == bookmarkBranch) {
1125 bookmarkBranchSelection();
1126 } else if (itm == activeBranch) {
1127 activeBranchSelection();
1128 } else if (itm == recentBranch) {
1129 recentBranchSelection();
1130 } else if (itm == rangeBranch) {
1131 rangeBranchSelection();
1132 } else {
1133 hideProps();
1134 refreshLayout();
1135 }
1136
1137 return;
1138 }
1139
1140 if (tvi->type == TreeViewItem::Type::TREEVIEW_ITEM_TYPE_ACTIVE) {
1141 activeSelection(tvi->demod);
1142 if (tvi->demod->isActive()) {
1143 wxGetApp().getDemodMgr().setActiveDemodulator(nullptr, true);
1144 wxGetApp().getDemodMgr().setActiveDemodulator(tvi->demod, false);
1145 tvi->demod->setTracking(true);
1146 }
1147 } else if (tvi->type == TreeViewItem::Type::TREEVIEW_ITEM_TYPE_RECENT) {
1148 recentSelection(tvi->bookmarkEnt);
1149 } else if (tvi->type == TreeViewItem::Type::TREEVIEW_ITEM_TYPE_BOOKMARK) {
1150 bookmarkSelection(tvi->bookmarkEnt);
1151 } else if (tvi->type == TreeViewItem::Type::TREEVIEW_ITEM_TYPE_GROUP) {
1152 groupSelection(tvi->groupName);
1153 } else if (tvi->type == TreeViewItem::Type::TREEVIEW_ITEM_TYPE_RANGE) {
1154 rangeSelection(tvi->rangeEnt);
1155 } else {
1156 hideProps();
1157 refreshLayout();
1158 }
1159}
1160
1161
1162void BookmarkView::onTreeSelectChanging( wxTreeEvent& event ) {

Callers

nothing calls this directly

Calls 3

setActiveDemodulatorMethod · 0.80
setTrackingMethod · 0.80
isActiveMethod · 0.45

Tested by

no test coverage detected