From 8c729319babcc1346340a98852009a3db8aa1c6f Mon Sep 17 00:00:00 2001 From: interpretivechaos <ryan_maloney@brown.edu> Date: Tue, 21 May 2013 14:45:56 -0400 Subject: [PATCH] Fixes splitter saving hang --- Source/Processors/Editors/GenericEditor.cpp | 20 +++++++++++++++----- Source/Processors/Editors/GenericEditor.h | 2 ++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Source/Processors/Editors/GenericEditor.cpp b/Source/Processors/Editors/GenericEditor.cpp index 28f5f8bcf..031ea4613 100755 --- a/Source/Processors/Editors/GenericEditor.cpp +++ b/Source/Processors/Editors/GenericEditor.cpp @@ -90,7 +90,10 @@ void GenericEditor::constructorInitialize(GenericProcessor* owner, bool useDefau addChildComponent(channelSelector); channelSelector->setVisible(false); - + isSplitOrMerge=false; + } + else{ + isSplitOrMerge=true; } backgroundGradient = ColourGradient(Colour(190, 190, 190), 0.0f, 0.0f, @@ -475,10 +478,17 @@ bool GenericEditor::getAudioStatus(int chan) void GenericEditor::getChannelSelectionState(int chan, bool* p, bool* r, bool* a) { - - *p = channelSelector->getParamStatus(chan); - *r = channelSelector->getRecordStatus(chan); - *a = channelSelector->getAudioStatus(chan); + if (!isSplitOrMerge) + { + *p = channelSelector->getParamStatus(chan); + *r = channelSelector->getRecordStatus(chan); + *a = channelSelector->getAudioStatus(chan); + } + else{ + *p = FALSE; + *r = FALSE; + *a = FALSE; + } } void GenericEditor::setChannelSelectionState(int chan, bool p, bool r, bool a) diff --git a/Source/Processors/Editors/GenericEditor.h b/Source/Processors/Editors/GenericEditor.h index c8c59178b..762b9bc3f 100755 --- a/Source/Processors/Editors/GenericEditor.h +++ b/Source/Processors/Editors/GenericEditor.h @@ -275,6 +275,8 @@ private: bool isSelected; bool isEnabled; + /**Used to determine if an editor is a splitter or Merger to avoid calling on CHannelSelector*/ + bool isSplitOrMerge; int tNum; -- GitLab