diff options
Diffstat (limited to 'classes/Bowelyzer.sc')
-rw-r--r-- | classes/Bowelyzer.sc | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/classes/Bowelyzer.sc b/classes/Bowelyzer.sc index e1fba76..35aa0c3 100644 --- a/classes/Bowelyzer.sc +++ b/classes/Bowelyzer.sc @@ -193,9 +193,19 @@ Bowelyzer{ key: \saveas, func: {|msg, time, addr, recvPort| var name = msg[0], - fileName = msg[1]; + fileName = msg[1], + dict; postln("Received: "++msg); - config.writeConfigurationFile(fileName); + if(config.writeConfigurationFile(fileName), { + if((gui.configFilePathView.items.size == 0), { + gui.setCurrentConfigFilePath(fileName); + },{ + dict = Dictionary.with(*gui.configFilePathView.items); + if(dict.includesKey(fileName.asSymbol).not,{ + gui.setCurrentConfigFilePath(fileName); + }); + }); + }); }, path: "/saveas", srcID: hub.local @@ -225,8 +235,13 @@ Bowelyzer{ hub.addSynthListener(name); }); // reload the addresses and ports Views - gui.removeAddressesAndPorts; - gui.setupAddressesAndPorts(config.config); + gui.removeSettingsView("synthServer"); + gui.removeSettingsView("hub"); + gui.removeSettingsView("forward"); + gui.setupSynthServerView(config.config); + gui.setupHubView(config.config); + gui.setupForwardView(config.config); + gui.setCurrentConfigFilePath(config.configFilePath); },{ ("Configuration could not be read: "++fileName).error; }); |