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

Method PostRepatch

Source/ControlSequencer.cpp:274–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void ControlSequencer::PostRepatch(PatchCableSource* cableSource, bool fromUserClick)
275{
276 bool wasEmpty = (mTargets[0] == nullptr);
277
278 for (size_t i = 0; i < mTargets.size(); ++i)
279 {
280 if (i < mControlCable->GetPatchCables().size())
281 mTargets[i] = dynamic_cast<IUIControl*>(mControlCable->GetPatchCables()[i]->GetTarget());
282 else
283 mTargets[i] = nullptr;
284 }
285
286 if (wasEmpty && mControlCable->GetPatchCables().size() == 1)
287 {
288 for (int i = 0; i < mGrid->GetCols(); ++i)
289 mGrid->SetVal(i, 0, GetUIControl()->GetMidiValue());
290 }
291}
292
293void ControlSequencer::IntSliderUpdated(IntSlider* slider, int oldVal, double time)
294{

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.80
SetValMethod · 0.80
GetTargetMethod · 0.45
GetColsMethod · 0.45
GetMidiValueMethod · 0.45

Tested by

no test coverage detected