Simplify the refreshing of the visibility header on lock/unlock
This commit is contained in:
@@ -347,23 +347,11 @@ function Bar:ApplyVisibilityDriver()
|
||||
-- default state is shown
|
||||
local driver = table_concat(self.hidedriver, ";")
|
||||
RegisterStateDriver(self, "vis", driver)
|
||||
|
||||
local state = self:GetAttribute("state-vis")
|
||||
if state == "hide" then
|
||||
self:Hide()
|
||||
elseif state == "show" or state == "fade" then
|
||||
self:Show()
|
||||
self:SetAttribute("fade", (state == "fade"))
|
||||
end
|
||||
end
|
||||
|
||||
function Bar:DisableVisibilityDriver()
|
||||
UnregisterStateDriver(self, "vis")
|
||||
self:Show()
|
||||
self:SetScript("OnUpdate", nil)
|
||||
self:SetAttribute("fade", nil)
|
||||
self.faded = nil
|
||||
self:SetConfigAlpha()
|
||||
self:SetAttribute("state-vis", "show")
|
||||
end
|
||||
|
||||
function Bar:GetVisibilityOption(option, index)
|
||||
|
||||
Reference in New Issue
Block a user