Actual reseting settings fix (options menu)

This commit is contained in:
Azumgi 2018-01-29 09:13:24 +03:00
parent 07ac2ed2ae
commit 2f12dcc16e

View file

@ -1665,16 +1665,19 @@ VMFOptionsView.update_picked_option_for_settings_list_widgets = function (self)
loaded_setting_value = get_mod(widget_content.mod_name):get(widget_content.setting_name)
local setting_not_found = true
for i, option_value in ipairs(widget_content.options_values) do
if loaded_setting_value == option_value then
widget_content.current_option_number = i
widget_content.current_option_text = widget_content.options_texts[i]
return
setting_not_found = false
break
end
end
if setting_not_found then
if type(loaded_setting_value) ~= "nil" then
-- @TODO: warning: variable which is not in the stepper options list in config
end
@ -1687,6 +1690,7 @@ VMFOptionsView.update_picked_option_for_settings_list_widgets = function (self)
get_mod(widget_content.mod_name):set(widget_content.setting_name, widget_content.default_value)
end
end
end
elseif widget_type == "header" then