@@ -120,43 +120,46 @@ void LfpDisplayEditor::updateSubprocessorSelectorOptions()
120120 inputSampleRates.clear ();
121121 subprocessorSelection->clear (dontSendNotification);
122122
123- hasNoInputs = lfpProcessor->getTotalDataChannels () != 0 ;
124-
125- for (int i = 0 , len = lfpProcessor->getTotalDataChannels (); i < len; ++i)
126- {
127- int subProcessorIdx = lfpProcessor->getDataChannel (i)->getSubProcessorIdx ();
128-
129- bool success = inputSubprocessorIndices.add (subProcessorIdx);
130-
131- if (success) inputSampleRates.set (subProcessorIdx, lfpProcessor->getDataChannel (i)->getSampleRate ());
132-
133- }
134-
135- for (int i = 0 ; i < inputSubprocessorIndices.size (); ++i)
136- {
137- subprocessorSelection->addItem (String (*(inputSubprocessorIndices.begin () + i)), i + 1 );
138- }
139-
140- if (defaultSubprocessor >= 0 )
141- {
142- subprocessorSelection->setSelectedId (defaultSubprocessor + 1 , dontSendNotification);
143-
144- String sampleRateLabelText = " Sample Rate: " ;
145- sampleRateLabelText += String (inputSampleRates[*(inputSubprocessorIndices.begin () + defaultSubprocessor)]);
146-
147- subprocessorSampleRateLabel->setText (sampleRateLabelText, dontSendNotification);
148- // setCanvasDrawableSubprocessor(defaultSubprocessor);
149- }
150- else
151- {
152- subprocessorSelection->addItem (" None" , 1 );
153- subprocessorSelection->setSelectedId (1 , dontSendNotification);
154-
155- String sampleRateLabelText = " Sample Rate: <not available>" ;
156- subprocessorSampleRateLabel->setText (sampleRateLabelText, dontSendNotification);
157- // setCanvasDrawableSubprocessor(-1);
158-
159- }
123+ if (lfpProcessor->getTotalDataChannels () != 0 )
124+
125+ {
126+
127+ for (int i = 0 , len = lfpProcessor->getTotalDataChannels (); i < len; ++i)
128+ {
129+ int subProcessorIdx = lfpProcessor->getDataChannel (i)->getSubProcessorIdx ();
130+
131+ bool success = inputSubprocessorIndices.add (subProcessorIdx);
132+
133+ if (success) inputSampleRates.set (subProcessorIdx, lfpProcessor->getDataChannel (i)->getSampleRate ());
134+
135+ }
136+
137+ for (int i = 0 ; i < inputSubprocessorIndices.size (); ++i)
138+ {
139+ subprocessorSelection->addItem (String (*(inputSubprocessorIndices.begin () + i)), i + 1 );
140+ }
141+
142+ if (defaultSubprocessor >= 0 )
143+ {
144+ subprocessorSelection->setSelectedId (defaultSubprocessor + 1 , dontSendNotification);
145+
146+ String sampleRateLabelText = " Sample Rate: " ;
147+ sampleRateLabelText += String (inputSampleRates[*(inputSubprocessorIndices.begin () + defaultSubprocessor)]);
148+
149+ subprocessorSampleRateLabel->setText (sampleRateLabelText, dontSendNotification);
150+ // setCanvasDrawableSubprocessor(defaultSubprocessor);
151+ }
152+ else
153+ {
154+ subprocessorSelection->addItem (" None" , 1 );
155+ subprocessorSelection->setSelectedId (1 , dontSendNotification);
156+
157+ String sampleRateLabelText = " Sample Rate: <not available>" ;
158+ subprocessorSampleRateLabel->setText (sampleRateLabelText, dontSendNotification);
159+ // setCanvasDrawableSubprocessor(-1);
160+
161+ }
162+ }
160163}
161164
162165void LfpDisplayEditor::setCanvasDrawableSubprocessor (int index)
0 commit comments