MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / rebuildTree

Function rebuildTree

pj_app/src/ui/CurveListPanel.cpp:79–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void rebuildTree(CurveTreeView* tree_view, CatalogModel* catalog, const QSet<QString>& custom_keys) {
80 tree_view->clearCurves();
81 // Note: custom_view is NOT cleared here — custom series are managed separately
82 // via addCustomCurve/removeCustomCurve in MainWindow.
83 if (catalog == nullptr) {
84 return;
85 }
86 // Exclude keys routed to the Custom Series panel so they never appear in both.
87 std::vector<CatalogItem> tree_items;
88 for (const auto& item : catalog->items()) {
89 if (!custom_keys.contains(item.key)) {
90 tree_items.push_back(item);
91 }
92 }
93 addCatalogItems(tree_view, tree_items);
94}
95
96} // namespace
97

Callers 4

setCatalogMethod · 0.85
addCustomCurveMethod · 0.85
onCatalogItemsRemovedMethod · 0.85

Calls 4

addCatalogItemsFunction · 0.85
clearCurvesMethod · 0.80
itemsMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected