| 101 | } |
| 102 | |
| 103 | void EffectStackModel::removeService(const std::shared_ptr<Mlt::Service> &service) |
| 104 | { |
| 105 | QWriteLocker locker(&m_lock); |
| 106 | std::vector<int> to_delete; |
| 107 | for (int i = int(m_childServices.size()) - 1; i >= 0; --i) { |
| 108 | auto ptr = m_childServices[uint(i)].lock(); |
| 109 | if (ptr && service->get_int("_childid") == ptr->get_int("_childid")) { |
| 110 | for (int j = 0; j < rootItem->childCount(); ++j) { |
| 111 | std::static_pointer_cast<EffectItemModel>(rootItem->child(j))->unplantClone(ptr); |
| 112 | } |
| 113 | to_delete.push_back(i); |
| 114 | } |
| 115 | } |
| 116 | for (int i : to_delete) { |
| 117 | m_childServices.erase(m_childServices.begin() + i); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | void EffectStackModel::removeCurrentEffect() |
| 122 | { |
no test coverage detected