Skip to content

Commit

Permalink
[Bugfix] Fix issue with layout not properly updating when changing to…
Browse files Browse the repository at this point in the history
… "None"
  • Loading branch information
Krealle committed Nov 18, 2024
1 parent 49528c3 commit 11a7446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Data/Database.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ end
---@param layout string
function DB.SetMasterLayout(layout)
CUF_DB.masterLayout = layout

CUF.vars.selectedLayout = DB.GetMasterLayout()

CUF:Fire("UpdateWidget", DB.GetMasterLayout())
CUF:Fire("UpdateUnitButtons")
end

Expand Down
4 changes: 0 additions & 4 deletions Menu/GeneralTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ function layoutProfile:SetLayoutItems()
["value"] = "CUFLayoutMasterNone",
["onClick"] = function()
DB.SetMasterLayout("CUFLayoutMasterNone")
CUF:Fire("UpdateUnitButtons")
CUF:Fire("UpdateWidget", Cell.vars.currentLayout)
copyLayoutFrom.SetLayoutItems()
end,
} }
Expand All @@ -107,8 +105,6 @@ function layoutProfile:SetLayoutItems()
["value"] = layoutName,
["onClick"] = function()
DB.SetMasterLayout(layoutName)
CUF:Fire("UpdateUnitButtons")
CUF:Fire("UpdateWidget", layoutName)
copyLayoutFrom.SetLayoutItems()
end,
})
Expand Down

0 comments on commit 11a7446

Please sign in to comment.