1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

Added some optimisations to AudioProcessorValueTreeState to avoid it refreshing unnecessarily

This commit is contained in:
jules 2016-01-13 12:53:38 +00:00
parent 99052af8bc
commit 76886ea268

View file

@ -258,21 +258,21 @@ void AudioProcessorValueTreeState::updateParameterConnectionsToChildTrees()
}
}
void AudioProcessorValueTreeState::valueTreePropertyChanged (ValueTree&, const Identifier& property)
void AudioProcessorValueTreeState::valueTreePropertyChanged (ValueTree& tree, const Identifier& property)
{
if (property == idPropertyID)
if (property == idPropertyID && tree.hasType (valueType) && tree.getParent() == state)
updateParameterConnectionsToChildTrees();
}
void AudioProcessorValueTreeState::valueTreeChildAdded (ValueTree& parent, ValueTree&)
void AudioProcessorValueTreeState::valueTreeChildAdded (ValueTree& parent, ValueTree& tree)
{
if (parent == state)
if (parent == state && tree.hasType (valueType))
updateParameterConnectionsToChildTrees();
}
void AudioProcessorValueTreeState::valueTreeChildRemoved (ValueTree& parent, ValueTree&, int)
void AudioProcessorValueTreeState::valueTreeChildRemoved (ValueTree& parent, ValueTree& tree, int)
{
if (parent == state)
if (parent == state && tree.hasType (valueType))
updateParameterConnectionsToChildTrees();
}