Skip to content

Commit 0842725

Browse files
authored
Merge pull request #91 from open-ephys-plugins/issue-69
Update headstage combo box options
2 parents 7a750ed + 52eaae5 commit 0842725

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Source/OnixSourceEditor.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ OnixSourceEditor::OnixSourceEditor(GenericProcessor* parentNode, OnixSource* sou
7070
headstageComboBoxA->addListener(this);
7171
headstageComboBoxA->setTooltip("Select the headstage connected to port A.");
7272
addHeadstageComboBoxOptions(headstageComboBoxA.get());
73-
headstageComboBoxA->setSelectedId(1, dontSendNotification);
7473
addAndMakeVisible(headstageComboBoxA.get());
7574

7675
portVoltageOverrideLabelA = std::make_unique<Label>("voltageOverrideLabelA", "Voltage:");
@@ -113,7 +112,6 @@ OnixSourceEditor::OnixSourceEditor(GenericProcessor* parentNode, OnixSource* sou
113112
headstageComboBoxB->addListener(this);
114113
headstageComboBoxB->setTooltip("Select the headstage connected to port B.");
115114
addHeadstageComboBoxOptions(headstageComboBoxB.get());
116-
headstageComboBoxB->setSelectedId(1, dontSendNotification);
117115
addAndMakeVisible(headstageComboBoxB.get());
118116

119117
portVoltageOverrideLabelB = std::make_unique<Label>("voltageOverrideLabelB", "Voltage:");
@@ -161,7 +159,8 @@ OnixSourceEditor::OnixSourceEditor(GenericProcessor* parentNode, OnixSource* sou
161159

162160
void OnixSourceEditor::addHeadstageComboBoxOptions(ComboBox* comboBox)
163161
{
164-
comboBox->addItem("Select headstage...", 1);
162+
comboBox->setTextWhenNothingSelected("Select Headstage...");
163+
comboBox->addItem("None", 1);
165164
comboBox->addSeparator();
166165
comboBox->addItem(NEUROPIXELSV1F_HEADSTAGE_NAME, 2);
167166
comboBox->addItem(NEUROPIXELSV1E_HEADSTAGE_NAME, 3);
@@ -421,6 +420,10 @@ void OnixSourceEditor::updateComboBox(ComboBox* cb)
421420
passthroughValue = true;
422421
}
423422
}
423+
else
424+
{
425+
cb->setSelectedId(0, dontSendNotification);
426+
}
424427

425428
source->getParameter(passthroughName)->setNextValue(passthroughValue);
426429

0 commit comments

Comments
 (0)