Skip to content

Commit

Permalink
Visibility fixes for raid and party frames solo Closes #391
Browse files Browse the repository at this point in the history
  • Loading branch information
Wutname1 committed Sep 6, 2024
1 parent e9ba325 commit a997646
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@
"ObjectiveTrackerFrame",
"RENOWN_LEVEL_LABEL",
"STANDING",
"UNKNOWN"
"UNKNOWN",
"UnregisterAttributeDriver"
],
"Lua.workspace.ignoreDir": [".vscode", "libs/*"],
"Lua.diagnostics.enable": true,
Expand Down
1 change: 1 addition & 0 deletions Modules/UnitFrames/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ function Options:AddGroupDisplay(frameName, OptionSet)
UF.DB.UserSettings[UF.DB.Style][frameName][setting] = val
--Update the screen
UF.Unit:Get(frameName).header:SetAttribute(setting, val)
UF.Unit:Get(frameName):UpdateAll()
end,
args = {
showRaid = {
Expand Down
5 changes: 2 additions & 3 deletions Modules/UnitFrames/SpawnFrames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,14 @@ function UF:SpawnFrames()
local firstElement = groupElement.header or groupElement.frames[1] or groupElement
if firstElement then
local function GroupFrameUpdateAll(groupFrame)
UnregisterAttributeDriver(firstElement, 'state-visibility')
if VisibilityCheck(frameName) and UF.CurrentSettings[frameName].enabled then
if firstElement.visibility then RegisterStateDriver(firstElement, firstElement.visibility) end
firstElement:Show()

for i, f in pairs(groupFrame.frames) do
for _, f in pairs(groupFrame.frames) do
if f.UpdateAll then f:UpdateAll() end
end
else
UnregisterStateDriver(firstElement, 'visibility')
firstElement:Hide()
end
end
Expand Down

0 comments on commit a997646

Please sign in to comment.