diff --git a/Plugins/LfpViewer/EventDisplayInterface.cpp b/Plugins/LfpViewer/EventDisplayInterface.cpp index e01ffae94..8a7cb3f1b 100644 --- a/Plugins/LfpViewer/EventDisplayInterface.cpp +++ b/Plugins/LfpViewer/EventDisplayInterface.cpp @@ -36,7 +36,6 @@ EventDisplayInterface::EventDisplayInterface (LfpDisplay* display_, LfpDisplaySp chButton = std::make_unique (String (channelNumber + 1)); chButton->setRadius (5.0f); - chButton->setEnabledState (true); chButton->addListener (this); addAndMakeVisible (chButton.get()); @@ -65,7 +64,7 @@ void EventDisplayInterface::buttonClicked (Button* button) display->setEventDisplayState (channelNumber, true); } - chButton->setEnabledState (! isEnabled); + isEnabled = ! isEnabled; repaint(); } diff --git a/Plugins/LfpViewer/EventDisplayInterface.h b/Plugins/LfpViewer/EventDisplayInterface.h index 91095144c..46d27b37e 100644 --- a/Plugins/LfpViewer/EventDisplayInterface.h +++ b/Plugins/LfpViewer/EventDisplayInterface.h @@ -62,10 +62,9 @@ class EventDisplayInterface : public Component, /** Checks whether events should be displayed for this channel*/ void checkEnabledState(); - bool isEnabled; - private: int channelNumber; + bool isEnabled; LfpDisplay* display; LfpDisplaySplitter* canvasSplit;