| 82 | } |
| 83 | |
| 84 | PatchCable* PatchCableSource::AddPatchCable(IClickable* target) |
| 85 | { |
| 86 | for (auto cable : mPatchCables) |
| 87 | { |
| 88 | if (cable != nullptr && cable->GetTarget() == target) |
| 89 | return nullptr; |
| 90 | } |
| 91 | |
| 92 | PatchCable* cable = new PatchCable(this); |
| 93 | mPatchCables.push_back(cable); |
| 94 | |
| 95 | if (target) |
| 96 | SetPatchCableTarget(cable, target, false); |
| 97 | |
| 98 | return cable; |
| 99 | } |
| 100 | |
| 101 | void PatchCableSource::SetPatchCableTarget(PatchCable* cable, IClickable* target, bool fromUserClick) |
| 102 | { |
no test coverage detected