Fix show current and default values in config dialog (#3961)

pull/3962/head
Robert 6 years ago committed by GitHub
parent da65db191b
commit 693bb84084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,7 +38,7 @@ local function showValues(configurable, option)
end
if not default then
default = "not set"
if option.toggle then
if option.toggle and option.values then
value_current = current
current = arg_table[current]
end
@ -48,6 +48,20 @@ local function showValues(configurable, option)
default = arg_table[default]
current = arg_table[current]
end
if option.labels and option.values then
for i=1,#option.labels do
if default == option.values[i] then
default = option.labels[i]
break
end
end
for i=1,#option.labels do
if current == option.values[i] then
current = option.labels[i]
break
end
end
end
if option.name_text_true_values and option.toggle and option.values and value_default then
UIManager:show(InfoMessage:new{
text = T(_("%1:\nCurrent value: %2 (%5%4)\nDefault value: %3 (%6%4)"), option.name_text,

Loading…
Cancel
Save