aboutsummaryrefslogtreecommitdiffstats
path: root/classes/BowelyzerConfig.sc
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-07-14 02:46:48 +0200
committerDavid Runge <dave@sleepmap.de>2016-07-14 02:46:48 +0200
commitfd532a95f547e752184dbfa5d9fed8f9b16f89fc (patch)
tree1117d980623287ac29b890393203deb5f39ad741 /classes/BowelyzerConfig.sc
parentf1b95d253283fe451d525d9386e60880f38a2160 (diff)
downloadbowelyzer-fd532a95f547e752184dbfa5d9fed8f9b16f89fc.tar.gz
bowelyzer-fd532a95f547e752184dbfa5d9fed8f9b16f89fc.tar.bz2
bowelyzer-fd532a95f547e752184dbfa5d9fed8f9b16f89fc.tar.xz
bowelyzer-fd532a95f547e752184dbfa5d9fed8f9b16f89fc.zip
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.
Diffstat (limited to 'classes/BowelyzerConfig.sc')
-rw-r--r--classes/BowelyzerConfig.sc5
1 files changed, 3 insertions, 2 deletions
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