Apply a whole list of configuration settings that were forgotten on changing profiles.
This commit is contained in:
@@ -566,12 +566,40 @@ function Omen:OnProfileChanged(event, database, newProfileKey)
|
|||||||
self:ReAnchorBars()
|
self:ReAnchorBars()
|
||||||
self:ReAnchorLabels()
|
self:ReAnchorLabels()
|
||||||
self:UpdateBarLabelSettings()
|
self:UpdateBarLabelSettings()
|
||||||
self:UpdateVisible()
|
|
||||||
self:UpdateBars()
|
|
||||||
self:UpdateFuBarSettings()
|
self:UpdateFuBarSettings()
|
||||||
|
-- These remainder settings were not placed in functions
|
||||||
|
-- and were just updated directly from the config code.
|
||||||
if LDBIcon then
|
if LDBIcon then
|
||||||
LDBIcon:Refresh("Omen", db.MinimapIcon)
|
LDBIcon:Refresh("Omen", db.MinimapIcon)
|
||||||
end
|
end
|
||||||
|
if db.ShowWith.HideWhenOOC then
|
||||||
|
self:RegisterEvent("PLAYER_REGEN_DISABLED", "UpdateVisible")
|
||||||
|
self:RegisterEvent("PLAYER_REGEN_ENABLED", "UpdateVisible")
|
||||||
|
else
|
||||||
|
self:UnregisterEvent("PLAYER_REGEN_DISABLED")
|
||||||
|
self:UnregisterEvent("PLAYER_REGEN_ENABLED")
|
||||||
|
end
|
||||||
|
if db.UseFocus then
|
||||||
|
self:RegisterEvent("UNIT_TARGET")
|
||||||
|
else
|
||||||
|
self:UnregisterEvent("UNIT_TARGET")
|
||||||
|
end
|
||||||
|
local f = self.TPSUpdateFrame
|
||||||
|
if f then
|
||||||
|
if db.Bar.ShowTPS then f:Show() else f:Hide() end
|
||||||
|
end
|
||||||
|
if db.Bar.ShowValue and db.Bar.ShowPercent then
|
||||||
|
bar.Text2:SetText(L["Threat [%]"])
|
||||||
|
else
|
||||||
|
bar.Text2:SetText(L["Threat"])
|
||||||
|
end
|
||||||
|
local texturepath = LSM:Fetch("statusbar", db.Bar.Texture)
|
||||||
|
for i = 0, #bars do
|
||||||
|
bars[i].texture:SetTexture(texturepath)
|
||||||
|
end
|
||||||
|
|
||||||
|
self:UpdateVisible()
|
||||||
|
self:UpdateBars()
|
||||||
end
|
end
|
||||||
|
|
||||||
function Omen:SetAnchors(useDB)
|
function Omen:SetAnchors(useDB)
|
||||||
|
|||||||
Reference in New Issue
Block a user