From bb4b87b33bc11fe4b7e611a32d054de6fb8db81f Mon Sep 17 00:00:00 2001
From: Septen <gammerxpower@gmail.com>
Date: Sun, 10 Apr 2016 15:45:59 +0400
Subject: [PATCH] CAR: some minor fixes.

---
 Source/Plugins/CAR/CAR.cpp       | 2 +-
 Source/Plugins/CAR/CAREditor.cpp | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Source/Plugins/CAR/CAR.cpp b/Source/Plugins/CAR/CAR.cpp
index bb65bf868..a57b7ca8c 100644
--- a/Source/Plugins/CAR/CAR.cpp
+++ b/Source/Plugins/CAR/CAR.cpp
@@ -124,7 +124,7 @@ void CAR::setReferenceChannelState (int channel, bool newState)
     if (! newState)
         m_referenceChannels.removeFirstMatchingValue (channel);
     else
-        m_referenceChannels.add (channel);
+        m_referenceChannels.addIfNotAlreadyThere (channel);
 }
 
 
diff --git a/Source/Plugins/CAR/CAREditor.cpp b/Source/Plugins/CAR/CAREditor.cpp
index 30fb78445..f9f2ed96a 100644
--- a/Source/Plugins/CAR/CAREditor.cpp
+++ b/Source/Plugins/CAR/CAREditor.cpp
@@ -40,6 +40,7 @@ CAREditor::CAREditor (GenericProcessor* parentProcessor, bool useDefaultParamete
     , m_gainSlider                   (new ParameterSlider (0.0, 100.0, 100.0, FONT_LABELS))
 {
     TextButton* referenceChannelsButton = new TextButton ("Reference", "Switch to reference channels");
+    referenceChannelsButton->setClickingTogglesState (true);
     referenceChannelsButton->setToggleState (true, dontSendNotification);
     referenceChannelsButton->setColour (TextButton::buttonColourId,     Colour (0x0));
     referenceChannelsButton->setColour (TextButton::buttonOnColourId,   Colour (0x0));
@@ -47,6 +48,7 @@ CAREditor::CAREditor (GenericProcessor* parentProcessor, bool useDefaultParamete
     referenceChannelsButton->setColour (TextButton::textColourOnId,     COLOUR_ACCENT);
 
     TextButton* affectedChannelsButton  = new TextButton ("Affected", "Switch to affected channels");
+    affectedChannelsButton->setClickingTogglesState (true);
     affectedChannelsButton->setColour (TextButton::buttonColourId,     Colour (0x0));
     affectedChannelsButton->setColour (TextButton::buttonOnColourId,   Colour (0x0));
     affectedChannelsButton->setColour (TextButton::textColourOffId,    COLOUR_PRIMARY);
-- 
GitLab