MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / setReference

Method setReference

Source/Core/CtrlrModulator/CtrlrModulator.cpp:427–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427void CtrlrModulator::setReference (const String &modulatorToReference)
428{
429 if (modulatorToReference == COMBO_NONE_ITEM)
430 {
431 ctrlrModulatorReference = 0;
432 }
433 else if (modulatorToReference != getName())
434 {
435 CtrlrModulator *m = owner.getModulator (modulatorToReference);
436 if (m == nullptr)
437 {
438 _WRN("CtrlrModulator::setReference ["+getName()+"] can't find modulator with name \""+modulatorToReference+"\" link won't work");
439 }
440 ctrlrModulatorReference = m;
441 }
442 else
443 {
444 AlertWindow::showMessageBox (AlertWindow::WarningIcon, "Modulator link", "Can't link to myself");
445 setProperty (Ids::modulatorLinkedToModulator, COMBO_NONE_ITEM);
446 }
447}
448
449void CtrlrModulator::modifyReference(const int newValue)
450{

Callers

nothing calls this directly

Calls 3

setPropertyFunction · 0.85
getNameFunction · 0.50
getModulatorMethod · 0.45

Tested by

no test coverage detected