File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Source/Processors/Parameter Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ void ParameterCollection::copyParameterValuesTo (ParameterOwner* pOwner)
9696 {
9797 MaskChannelsParameter* targetMaskParam = (MaskChannelsParameter*) targetParam;
9898 int targetChannelCount = targetMaskParam->getChannelCount ();
99+ const int savedChannelCount = owner.channel_count ;
99100
100101 Array<var> filteredValues;
101102 for (int i = 0 ; i < parameter->getValue ().getArray ()->size (); i++)
@@ -104,6 +105,15 @@ void ParameterCollection::copyParameterValuesTo (ParameterOwner* pOwner)
104105 if (channelIndex >= 0 && channelIndex < targetChannelCount)
105106 filteredValues.add (channelIndex);
106107 }
108+
109+ // Auto-include any channels that exist on the device but were absent in the
110+ // saved configuration (e.g., saved with fewer channels than currently available).
111+ if (targetChannelCount > savedChannelCount)
112+ {
113+ for (int ch = savedChannelCount; ch < targetChannelCount; ++ch)
114+ filteredValues.addIfNotAlreadyThere (ch);
115+ }
116+
107117 targetParam->currentValue = filteredValues;
108118 }
109119 else if (parameter->getType () == Parameter::SELECTED_CHANNELS_PARAM)
You can’t perform that action at this time.
0 commit comments