| 259 | } |
| 260 | |
| 261 | void RadioSequencer::SyncControlCablesToGrid() |
| 262 | { |
| 263 | if (mGrid->GetRows() == mControlCables.size()) |
| 264 | return; //nothing to do |
| 265 | |
| 266 | if (mGrid->GetRows() > mControlCables.size()) |
| 267 | { |
| 268 | int oldSize = (int)mControlCables.size(); |
| 269 | mControlCables.resize(mGrid->GetRows()); |
| 270 | for (int i = oldSize; i < mControlCables.size(); ++i) |
| 271 | { |
| 272 | mControlCables[i] = new PatchCableSource(this, kConnectionType_ValueSetter); |
| 273 | mControlCables[i]->SetOverrideCableDir(ofVec2f(1, 0), PatchCableSource::Side::kRight); |
| 274 | //mControlCables[i]->SetColor(GetRowColor(i)); |
| 275 | AddPatchCableSource(mControlCables[i]); |
| 276 | } |
| 277 | } |
| 278 | else |
| 279 | { |
| 280 | for (int i = mGrid->GetRows(); i < mControlCables.size(); ++i) |
| 281 | RemovePatchCableSource(mControlCables[i]); |
| 282 | mControlCables.resize(mGrid->GetRows()); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | void RadioSequencer::CheckboxUpdated(Checkbox* checkbox, double time) |
| 287 | { |
nothing calls this directly
no test coverage detected