From 98a378dd27dc34c2fa2a19c609a470e3c33f2f0b Mon Sep 17 00:00:00 2001
From: Josh Siegle <jsiegle@mit.edu>
Date: Thu, 3 Oct 2013 16:45:50 -0400
Subject: [PATCH] Don't allow ADC or rescan buttons to be clicked while
 acquisition is active

---
 Source/Processors/Editors/RHD2000Editor.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/Processors/Editors/RHD2000Editor.cpp b/Source/Processors/Editors/RHD2000Editor.cpp
index 2ba24de67..e8e36c993 100644
--- a/Source/Processors/Editors/RHD2000Editor.cpp
+++ b/Source/Processors/Editors/RHD2000Editor.cpp
@@ -115,7 +115,7 @@ void RHD2000Editor::scanPorts()
 void RHD2000Editor::buttonEvent(Button* button)
 {
 
-    if (button == rescanButton)
+    if (button == rescanButton && !acquisitionIsActive)
     {
         board->scanPorts();
 
@@ -133,7 +133,7 @@ void RHD2000Editor::buttonEvent(Button* button)
     {
         channelSelector->setRadioStatus(true);
     }
-    else if (button == adcButton)
+    else if (button == adcButton && !acquisitionIsActive)
     {
         board->enableAdcs(button->getToggleState());
         getEditorViewport()->makeEditorVisible(this, false, true);
-- 
GitLab