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

Method removeItems

pj_runtime/src/CatalogModel.cpp:737–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737void CatalogModel::removeItems(const std::vector<QString>& keys) {
738 // Accepts any catalog item kind. Object-topic keys are honored too, so the
739 // trash/remove flow stays symmetric across scalar fields and object topics
740 // — rebuildFromDatastore consults the same blacklist for both, so an entry
741 // removed here will not silently come back on the next commit.
742 QStringList removed;
743 for (const QString& key : keys) {
744 const auto it = impl_->items.find(key);
745 if (it == impl_->items.end()) {
746 continue;
747 }
748 const DatasetId dataset_id = it->second.dataset_id;
749 impl_->removed_names_per_dataset[dataset_id].insert(key);
750 impl_->items.erase(it);
751 removed.push_back(key);
752 }
753 if (!removed.isEmpty()) {
754 emit itemsRemoved(removed);
755 }
756}
757
758void CatalogModel::removeCurves(const std::vector<QString>& keys) {
759 removeItems(keys);

Callers 3

TESTFunction · 0.80
TESTFunction · 0.80

Calls 5

eraseMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
isEmptyMethod · 0.45

Tested by 2

TESTFunction · 0.64
TESTFunction · 0.64