Simplify the refreshing of the visibility header on lock/unlock

This commit is contained in:
Hendrik Leppkes
2008-10-15 11:02:11 +02:00
parent a96818756b
commit 5b9d669956
+1 -13
View File
@@ -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)