[fix] Conflict type file and settings bind mode

This commit is contained in:
ljf (zamentur) 2023-08-25 21:12:01 +02:00 committed by GitHub
parent fde05c0ac2
commit 79e620ef42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,13 +153,16 @@ for panel_name, panel in loaded_toml.items():
if bind_section:
bind = bind_section
else:
bind = 'settings' if param.get('type', 'string') != 'file' else 'null'
bind = 'settings'
elif bind[-1] == ":" and bind_section and ":" in bind_section:
regex, bind_file = bind_section.split(":")
if ">" in bind:
bind = bind + bind_file
else:
bind = regex + bind + bind_file
if bind == "settings" and param.get('type', 'string') == 'file':
bind = 'null'
print(';'.join([
name,
param.get('type', 'string'),