MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / SyncControlCablesToGrid

Method SyncControlCablesToGrid

Source/RadioSequencer.cpp:261–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void 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
286void RadioSequencer::CheckboxUpdated(Checkbox* checkbox, double time)
287{

Callers

nothing calls this directly

Calls 5

ofVec2fClass · 0.85
sizeMethod · 0.80
resizeMethod · 0.80
SetOverrideCableDirMethod · 0.80
GetRowsMethod · 0.45

Tested by

no test coverage detected