Details! Damage Meter

Details! Damage Meter

250M Downloads

Changing row icon texture from "No Icon" to "Specialization" does not change the icon visibility

Undisclosed-Information opened this issue ยท 0 comments

commented

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:

  1. change texture to "No Icon"
  2. icons are not visible anymore on a row
  3. change texture to "Specialization" or "Specialization Alpha"
  4. 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