Skip to content

Commit

Permalink
Hotfix 2.3.1 Update
Browse files Browse the repository at this point in the history
The Background and Text "Visible" checkboxes will now be updated properly and work as expected when a preset is applied.
  • Loading branch information
Arxareon committed Jul 24, 2023
1 parent d8e7242 commit a7d2782
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 12 additions & 4 deletions RemainingXP/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -868,14 +868,22 @@ local function ApplyPreset(i)
frames.options.display.position.xOffset.setValue(db.display.position.offset.x)
frames.options.display.position.yOffset.setValue(db.display.position.offset.y)
frames.options.display.position.frameStrata.setSelected(db.display.layer.strata)
if not db.display.background.visible then
frames.options.display.text.visible.setState(true)
frames.options.display.text.visible:SetAttribute("loaded", true) --Update dependent widgets
end
frames.options.display.text.visible.setState(true)
frames.options.display.text.visible:SetAttribute("loaded", true) --Update dependent widgets
frames.options.display.background.visible.setState(db.display.background.visible)
frames.options.display.background.visible:SetAttribute("loaded", true) --Update dependent widgets
frames.options.display.background.size.width.setValue(db.display.background.size.width)
frames.options.display.background.size.height.setValue(db.display.background.size.height)

--Check the visibility options widgets
if not db.display.background.visible then
frames.options.display.text.visible.checkbox:SetButtonState("DISABLED")
frames.options.display.text.visible.checkbox:UnlockHighlight()
frames.options.display.text.visible:SetAlpha(0.4)
else
frames.options.display.text.visible.checkbox:SetButtonState("NORMAL")
frames.options.display.text.visible:SetAlpha(1)
end
end

--Save the current display position & visibility to the custom preset
Expand Down
3 changes: 2 additions & 1 deletion RemainingXP/Resources.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ local changelogDB = {
"The XP Display size will now properly be able to be set again via Settings after applying a preset.",
"The default XP Status Bar will now be hidden again after exiting Edit Mode if the \"Hide default XP bar\" option is enabled.",
"Other small fixes, changes & improvements.",
"#F_Hotfix (2.3.1 7/24/2023):_#",
"#F_Hotfix 2.3.1 (7/24/2023):_#",
"The Background and Text \"Visible\" checkboxes will now be updated properly and work as expected when a preset is applied.",
"Addon data recovery will now work properly when loading old data.",
},
}
Expand Down

0 comments on commit a7d2782

Please sign in to comment.