Dispatcher: fix table (#6324)

accessing the table via reference rather than copying the values was breaking the configdialog
reviewable/pr6327/r1
yparitcher 4 years ago committed by GitHub
parent ac1fa5d677
commit 5795e6d63c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,10 +61,13 @@ function Dispatcher:init()
end end
if settingsList[option.name].category == "string" then if settingsList[option.name].category == "string" then
if settingsList[option.name].toggle == nil then if settingsList[option.name].toggle == nil then
settingsList[option.name].toggle = option.toggle or option.labels or option.values settingsList[option.name].toggle = option.toggle or option.labels
for z=1,#settingsList[option.name].toggle do if settingsList[option.name].toggle == nil then
if type(settingsList[option.name].toggle[z]) == "table" then settingsList[option.name].toggle = {}
settingsList[option.name].toggle[z] = settingsList[option.name].toggle[z][1] for z=1,#option.values do
if type(option.values[z]) == "table" then
settingsList[option.name].toggle[z] = option.values[z][1]
end
end end
end end
end end

Loading…
Cancel
Save