Skip to content
Snippets Groups Projects
Commit ceded719 authored by jsiegle's avatar jsiegle
Browse files

Merge pull request #15 from akmokhtari/master

Fixed spike detector crash
parents 87703b97 2017c1c9
No related branches found
No related tags found
No related merge requests found
...@@ -275,10 +275,18 @@ void SpikeDetectorEditor::buttonEvent(Button* button) ...@@ -275,10 +275,18 @@ void SpikeDetectorEditor::buttonEvent(Button* button)
} }
if (!button->getToggleState()) { if (!button->getToggleState())
thresholdSlider->setActive(false); {
electrodeButtons.clear(); thresholdSlider->setActive(false);
drawElectrodeButtons(electrodeList->getSelectedItemIndex());
// This will be -1 with nothing selected
int selectedItemIndex = electrodeList->getSelectedItemIndex();
if (selectedItemIndex != -1)
{
drawElectrodeButtons(selectedItemIndex);
} else {
electrodeButtons.clear();
}
} }
// channelSelector->setActiveChannels(activeChannels); // channelSelector->setActiveChannels(activeChannels);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment