AudioProcessorValueTreeState::Parameter::copyValueToValueTree() calls setPropertyExcludingListener(), giving this as listener to exclude.
That creates a ValueTree SetPropertyAction() with that Parameter given as ‘excludeListener’.
In consequence, when redo is called, SetPropertyAction::perform() will be called, but the parameter won’t be notified by the change.
Note that it “sometimes” work in practice, because you often modify your parameter twice in a row (through a slider drag for instance), and that creates a CoalescedAction.
and the SetPropertyAction created by SetPropertyAction::createCoalescedAction() does not take the listenerToExclude into account at all, so then it will work.
So to sum-up :
-
To fix the redo issue, could
AudioProcessorValueTreeState::Parameter::copyValueToValueTree()callsetProperty()instead ofsetPropertyExcludingListener()? (or would that bring up other issues?) -
shouldnt
SetPropertyAction::createCoalescedAction()takes into account the “listenerToExclude” when coalescing the SetPropertyActions?
