| 379 | } |
| 380 | |
| 381 | void ModuleContainer::DeleteCablesForControl(const IUIControl* control) |
| 382 | { |
| 383 | // Remove all cables that targetted control on this module |
| 384 | std::vector<IDrawableModule*> modules; |
| 385 | TheSynth->GetAllModules(modules); |
| 386 | std::vector<PatchCable*> cablesToDestroy; |
| 387 | for (const auto module_iter : modules) |
| 388 | { |
| 389 | for (const auto source : module_iter->GetPatchCableSources()) |
| 390 | { |
| 391 | for (const auto cable : source->GetPatchCables()) |
| 392 | { |
| 393 | if (cable->GetTarget() == control) |
| 394 | { |
| 395 | cablesToDestroy.push_back(cable); |
| 396 | break; |
| 397 | } |
| 398 | } |
| 399 | } |
| 400 | } |
| 401 | for (const auto cable : cablesToDestroy) |
| 402 | cable->Destroy(false); |
| 403 | } |
| 404 | |
| 405 | IDrawableModule* ModuleContainer::FindModule(std::string name, bool fail) |
| 406 | { |
no test coverage detected