Skip to content

Commit 6e5a0b2

Browse files
committed
setModulatorValue: make "ui" flag working again, because MIDIbox panels rely on this to avoid feedback loops between LUA and (delayed) UI
1 parent 8aa00d8 commit 6e5a0b2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Core/CtrlrModulator/CtrlrModulatorProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void CtrlrModulatorProcessor::handleAsyncUpdate()
4646
owner.setProperty (Ids::modulatorValue, currentValue.value);
4747
}
4848

49-
if (valueChangedCbk.get() && !owner.getRestoreState())
49+
if (valueChangedCbk.get() && !owner.getRestoreState() && currentValue.lastChangeSource != CtrlrModulatorValue::changedByProgram)
5050
{
5151
CtrlrPanel &ownerPanel = owner.getOwnerPanel();
5252
if (!ownerPanel.getRestoreState() && !ownerPanel.getBootstrapState() && valueChangedCbk->isValid())

Source/Lua/CtrlrLuaManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ void CtrlrModulator::setValueNonMapped (const int newValue, const bool force, co
10671067

10681068
void CtrlrModulator::setModulatorValue(const int newValue, bool vst, bool midi, bool ui)
10691069
{
1070-
processor.setValueGeneric (CtrlrModulatorValue (newValue, CtrlrModulatorValue::changedByLua), true, !midi);
1070+
processor.setValueGeneric (CtrlrModulatorValue (newValue, ui ? CtrlrModulatorValue::changedByProgram : CtrlrModulatorValue::changedByLua), true, !midi);
10711071
}
10721072

10731073
int CtrlrModulator::getValueMapped() const

0 commit comments

Comments
 (0)