From fd532a95f547e752184dbfa5d9fed8f9b16f89fc Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 14 Jul 2016 02:46:48 +0200 Subject: classes/BowelyzerConfig.sc: Updating writeConfigurationFile to return true on successful write. Only adding Dictionary in validateConfig for inputs that have no controls and copying the rest by value from defaultControls. This prevents bowelyzer from globally setting the active state for the next channel to be initialized by toggling any of the current. --- classes/BowelyzerConfig.sc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/BowelyzerConfig.sc b/classes/BowelyzerConfig.sc index 69ee1d4..df36126 100644 --- a/classes/BowelyzerConfig.sc +++ b/classes/BowelyzerConfig.sc @@ -326,6 +326,7 @@ BowelyzerConfig{ if(writeFinished && overwriteConfigFilePath, { configFilePath = fileName; }); + ^true; } // return a control value as correct type and within its defined ControlSpec range @@ -389,9 +390,9 @@ BowelyzerConfig{ }); // go through the inputs and add controls, if there are none setup for them config.at(\inputs).keysValuesDo({|name, channel| - // if there are no controls defined for the input, add them from default + // if there are no controls defined for the input at all, add a Dictionary the size of the defaultControls if(config.at(\controls).includesKey(name).not,{ - config.at(\controls).put(name, defaultControls); + config.at(\controls).put(name, Dictionary.new(defaultControls.size)); }); }); // go through each control dictionary -- cgit v1.2.3-70-g09d2