| 567 | } |
| 568 | |
| 569 | void 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 | |
| 588 | void CurveListPanel::removeCustomCurveByName(const QString& display_name) { |
| 589 | const auto it = custom_name_to_key_.constFind(display_name); |
no test coverage detected