Skip to content

Commit 9a50829

Browse files
authored
Merge pull request #88 from open-ephys-plugins/issue-67
Color selected electrodes as dark grey if the device is disabled
2 parents 6b810c2 + c30ccd7 commit 9a50829

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Source/UI/NeuropixelsV1Interface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@ void NeuropixelsV1Interface::buttonClicked(Button* button)
703703
}
704704

705705
updateInfoString();
706+
repaint();
706707

707708
CoreServices::updateSignalChain(editor);
708709
}

Source/UI/NeuropixelsV2eInterface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ void NeuropixelsV2eInterface::buttonClicked(Button* button)
104104
}
105105

106106
updateInfoString();
107+
repaint();
107108

108109
CoreServices::updateSignalChain(editor);
109110
}

Source/UI/ProbeBrowser.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,16 +622,23 @@ namespace OnixSourcePlugin
622622
Colour getElectrodeColour(int i)
623623
{
624624
auto mode = parent->getMode();
625-
626625
auto settings = getSettings();
626+
auto device = parent->getDevice();
627+
627628
if (settings == nullptr) return Colours::grey;
628629

629630
if (settings->electrodeMetadata[i].status == ElectrodeStatus::DISCONNECTED) // not available
630631
{
631632
return disconnectedColors[settings->electrodeMetadata[i].bank];
632633
}
633634
else if (settings->electrodeMetadata[i].type == ElectrodeType::REFERENCE)
635+
{
634636
return Colours::black;
637+
}
638+
else if (!device->isEnabled())
639+
{
640+
return Colours::darkgrey;
641+
}
635642
else
636643
{
637644
if (mode == VisualizationMode::ENABLE_VIEW) // ENABLED STATE

0 commit comments

Comments
 (0)