@@ -226,7 +226,6 @@ void PopupThresholdComponent::buttonClicked(Button* button)
226226
227227ThresholdSelectorCustomComponent::ThresholdSelectorCustomComponent (SpikeChannel* channel_, bool acquisitionIsActive_)
228228 : channel(channel_),
229- numChannels(channel_->getNumChannels ()),
230229 acquisitionIsActive(acquisitionIsActive_)
231230{
232231 thresholder_type = (CategoricalParameter*) channel->getParameter (" thrshlder_type" );
@@ -253,7 +252,7 @@ void ThresholdSelectorCustomComponent::mouseDown(const MouseEvent& event)
253252 auto * popupComponent = new PopupThresholdComponent (table,
254253 this ,
255254 row,
256- numChannels ,
255+ channel-> getNumChannels () ,
257256 ThresholderType (thresholder_type->getSelectedIndex ()),
258257 abs_thresholds,
259258 std_thresholds,
@@ -288,6 +287,7 @@ void ThresholdSelectorCustomComponent::setSpikeChannel(SpikeChannel* ch)
288287 std_thresholds.add ((FloatParameter*)channel->getParameter (" std_threshold" + String (ch + 1 )));
289288 dyn_thresholds.add ((FloatParameter*)channel->getParameter (" dyn_threshold" + String (ch + 1 )));
290289 }
290+
291291}
292292
293293void ThresholdSelectorCustomComponent::setRowAndColumn (const int newRow, const int newColumn)
@@ -317,7 +317,7 @@ void ThresholdSelectorCustomComponent::paint(Graphics& g)
317317 break ;
318318 }
319319
320- for (int i = 0 ; i < numChannels ; i++)
320+ for (int i = 0 ; i < channel-> getNumChannels () ; i++)
321321 {
322322 switch (thresholder_type->getSelectedIndex ())
323323 {
@@ -762,7 +762,7 @@ void SpikeDetectorTableModel::update(Array<SpikeChannel*> spikeChannels_)
762762 waveformComponents.clear ();
763763 thresholdComponents.clear ();
764764
765- for (int i = 0 ; i < getNumRows (); i++)
765+ for (int i = 0 ; i < getNumRows (); i++)
766766 {
767767
768768 Component* c = table->getCellComponent (SpikeDetectorTableModel::Columns::THRESHOLD, i);
0 commit comments