Skip to content

Commit 98ce153

Browse files
committed
Update LFP Viewer Editor in more situations
1 parent a604733 commit 98ce153

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

Source/Plugins/LfpDisplayNode/LfpDisplayEditor.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LfpDisplayEditor::LfpDisplayEditor(GenericProcessor* parentNode, bool useDefault
3737

3838
subprocessorSelection = new ComboBox("Subprocessor sample rate");
3939
// subprocessorSelection->setBounds(subprocessorSelectionLabel->getX()+5, subprocessorSelectionLabel->getBottom(), 60, 22);
40-
subprocessorSelection->setBounds(10, 30, 50, 22);
40+
subprocessorSelection->setBounds(10, 30, 55, 22);
4141
subprocessorSelection->addListener(this);
4242
addAndMakeVisible(subprocessorSelection);
4343

@@ -148,18 +148,17 @@ void LfpDisplayEditor::updateSubprocessorSelectorOptions()
148148

149149
subprocessorSampleRateLabel->setText(sampleRateLabelText, dontSendNotification);
150150
//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);
160151

152+
return;
161153
}
162154
}
155+
156+
subprocessorSelection->addItem("None", 1);
157+
subprocessorSelection->setSelectedId(1, dontSendNotification);
158+
159+
String sampleRateLabelText = "Sample Rate: <not available>";
160+
subprocessorSampleRateLabel->setText(sampleRateLabelText, dontSendNotification);
161+
//setCanvasDrawableSubprocessor(-1);
163162
}
164163

165164
void LfpDisplayEditor::setCanvasDrawableSubprocessor(int index)

Source/Plugins/LfpDisplayNode/LfpDisplayNode.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,10 @@ void LfpDisplayNode::updateSettings()
123123
displayBufferIndex.clear();
124124
displayBufferIndex.insertMultiple(0, 0, numChannelsInSubprocessor + numEventChannels);
125125

126-
// update the editor's subprocessor selection display, only if there's a mismatch in # of subprocessors
127-
if (numSubprocessors != totalSubprocessors)
128-
{
129-
LfpDisplayEditor * ed = (LfpDisplayEditor*)getEditor();
130-
ed->updateSubprocessorSelectorOptions();
131-
numSubprocessors = totalSubprocessors;
132-
}
126+
// update the editor's subprocessor selection display and sample rate
127+
LfpDisplayEditor * ed = (LfpDisplayEditor*)getEditor();
128+
ed->updateSubprocessorSelectorOptions();
129+
numSubprocessors = totalSubprocessors;
133130
}
134131

135132
uint32 LfpDisplayNode::getChannelSourceID(const EventChannel* event) const

0 commit comments

Comments
 (0)