# HG changeset patch # User Flick # Date 1301349155 25200 # Node ID 46b59a9ded7644b6b5f6f0dd4d520760c4d65092 # Parent 9e708a155ab984f938acd254efd35f9c7e43fe34 Fix some errors related to re-using action IDs diff -r 9e708a155ab9 -r 46b59a9ded76 Button.lua --- a/Button.lua Mon Mar 28 10:43:36 2011 -0700 +++ b/Button.lua Mon Mar 28 14:52:35 2011 -0700 @@ -233,7 +233,7 @@ end if id == nil then if unique then - return nil + error(("All action IDs for bars of type '%s' are in use, cannot create any more buttons"):format(self.config.barType)) end pool.nWraps = nWraps + 1 end diff -r 9e708a155ab9 -r 46b59a9ded76 StanceButton.lua --- a/StanceButton.lua Mon Mar 28 10:43:36 2011 -0700 +++ b/StanceButton.lua Mon Mar 28 14:52:35 2011 -0700 @@ -61,9 +61,8 @@ local barFrame = bar:GetFrame() local config = self:GetConfig() - -- set up the base stance ID - self:SetActionIDPool("stance",8) - config.stanceID = self:AcquireActionID(config.stanceID, idHint, true) + -- set up the stance ID + config.stanceID = config.stanceID or idx -- attribute setup f:SetAttribute("type","spell") @@ -101,6 +100,14 @@ return self.config.stanceID end +function Stance:AcquireActionID() + -- don't use pool +end + +function Stance:ReleaseActionID() + -- don't use pool +end + function Stance:UpdateAction() if InCombatLockdown() then self.updatePending = true diff -r 9e708a155ab9 -r 46b59a9ded76 VehicleExitButton.lua --- a/VehicleExitButton.lua Mon Mar 28 10:43:36 2011 -0700 +++ b/VehicleExitButton.lua Mon Mar 28 14:52:35 2011 -0700 @@ -70,6 +70,14 @@ return 1 end +function VExitButton:AcquireActionID() + -- don't use pool +end + +function VExitButton:ReleaseActionID() + -- don't use pool +end + function VExitButton:Refresh() Super.Refresh(self) -- it seems that setscale kills the texcoord, have to refresh it