# HG changeset patch # User Flick # Date 1239653891 0 # Node ID 497936c503a0b4dd12d8535f22e3fb6ad4431d0e # Parent 8b35239339c59907fa597599c61353e99c1497ab Fixed initialization order crashing bars when hideEmpty selected diff -r 8b35239339c5 -r 497936c503a0 classes/ActionButton.lua --- a/classes/ActionButton.lua Mon Apr 13 17:54:29 2009 +0000 +++ b/classes/ActionButton.lua Mon Apr 13 20:18:11 2009 +0000 @@ -187,16 +187,6 @@ f:SetAttribute("showgrid-event",0) f:SetAttribute("showgrid",not self:GetBarConfig().hideEmpty) - self:Refresh() - - -- attach to skinner - bar:SkinButton(self) - - -- initial display - if ReAction:GetConfigMode() then - self:ShowGridTemp(true) - end - -- non secure scripts f:SetScript("OnEvent", function(frame, ...) self:OnEvent(...) end) f:SetScript("OnEnter", function(frame) self:OnEnter() end) @@ -221,6 +211,16 @@ barFrame:WrapScript(f, "OnDragStart", _onDragStart) barFrame:WrapScript(f, "OnReceiveDrag", _onReceiveDrag) + -- attach to skinner + bar:SkinButton(self) + + -- initial display + if ReAction:GetConfigMode() then + self:ShowGridTemp(true) + end + + self:Refresh() + return self end