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

Method removeCustomCurve

pj_app/src/ui/CurveListPanel.cpp:569–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567}
568
569void CurveListPanel::removeCustomCurve(const QString& catalog_key) {
570 if (custom_view_ == nullptr) {
571 return;
572 }
573 custom_keys_.remove(catalog_key);
574 custom_name_to_key_.removeIf([&](const auto& it) { return it.value() == catalog_key; });
575 custom_view_->clearCurves();
576 if (catalog_ != nullptr) {
577 for (const auto& item : catalog_->items()) {
578 if (custom_keys_.contains(item.key)) {
579 CurveTreeView::CurvePath path;
580 path.key = item.key;
581 path.dataset = item.topic_name;
582 custom_view_->addCatalogItem(path);
583 }
584 }
585 }
586}
587
588void CurveListPanel::removeCustomCurveByName(const QString& display_name) {
589 const auto it = custom_name_to_key_.constFind(display_name);

Callers 1

MainWindowMethod · 0.80

Calls 6

clearCurvesMethod · 0.80
itemsMethod · 0.80
addCatalogItemMethod · 0.80
removeMethod · 0.45
valueMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected