Fix faust UIs.

main
Ben Niemann 1 year ago
parent f121171d74
commit 053670aaaf

@ -123,9 +123,10 @@ ColumnLayout {
}
TextInput {
Layout.fillWidth: true
enabled: {{ item.label }}Control.port.numConnections == 0
text: "%1".arg({{ item.label }}Control.port.port.controlValue)
validator: RegExpValidator { regExp : /[.0-9]*/ }
validator: RegExpValidator { regExp : /[-.0-9]*/ }
onEditingFinished: function() {
if (text) {
var value = parseFloat(text);
@ -211,7 +212,7 @@ yaml_parser = yaml.YAML(typ='safe')
with open(args.description, 'r') as fp:
description = yaml_parser.load(fp)
for port in description['ports']:
for port in description.get('ports', ''):
if 'faust_ui' not in port:
continue
fui = port['faust_ui']

@ -41,7 +41,7 @@ yaml_parser = yaml.YAML(typ='safe')
with open(args.yaml, 'r') as fp:
node_description = yaml_parser.load(fp)
for port in node_description['ports']:
for port in node_description.get('ports', []):
for field in ['faust_ui']:
if field in port:
del port[field]

Loading…
Cancel
Save