Changing row icon texture from "No Icon" to "Specialization" does not change the icon visibility
Undisclosed-Information opened this issue ยท 0 comments
When selecting a different icon texture for rows under [Bars: General] > [Icons] > [Texture] and following the path described below, the visibility of the icon stays invisible:
Steps to reproduce:
- change texture to "No Icon"
- icons are not visible anymore on a row
- change texture to "Specialization" or "Specialization Alpha"
- the icons stay invisible
Solution
The instance["row_info"]["no_icon"] entry is not updated again when you switch to a specialization texture file (having the previous setting to "No Icon". This is because a call to the SetBarSettings function is missing in the OnSelectIconFileSpec function to update the ["no_icon"] entry.
When you switch from "No Icon" to a different setting it works fine, because the ["no_icon"] entry is updated through said function in window_options2_sections.lua#L1115.
local OnSelectIconFileSpec = function(_, _, iconpath)
--missing a call to SetBarSettings here!
editInstanceSetting(currentInstance, "SetBarSpecIconSettings", true, iconpath, true)
afterUpdate()
end
local OnSelectIconFile = function(_, _, iconpath)
editInstanceSetting(currentInstance, "SetBarSettings", nil, nil, nil, nil, nil, nil, nil, nil, iconpath)
if (currentInstance.row_info.use_spec_icons) then
editInstanceSetting(currentInstance, "SetBarSpecIconSettings", false)
end
afterUpdate()
end