diff classes/ActionButton.lua @ 238:8bde290d300c

Chase away Lua errors when clicking 4.0 flyout actions (e.g. call pet, teleport)
author Flick
date Thu, 24 Mar 2011 14:27:56 -0700
parents 704f4a05a1d7
children
line wrap: on
line diff
--- a/classes/ActionButton.lua	Thu Mar 24 13:11:30 2011 -0700
+++ b/classes/ActionButton.lua	Thu Mar 24 14:27:56 2011 -0700
@@ -123,7 +123,7 @@
 
 local _onReceiveDrag = -- function(self, button, kind, value, ...)
 [[
-  if kind ~= "spell" and kind ~= "item" and kind ~= "macro" then
+  if kind ~= "spell" and kind ~= "item" and kind ~= "macro" and kind ~= "flyout" then
     return kind, value, ...
   else
     if showgrid_event and showgrid_event > 0 then
@@ -237,6 +237,8 @@
     f:RegisterEvent(evt)
   end
 
+  f.action = config.actionID -- need this to support silly ActionButton_UpdateFlyout. Should not taint anything anymore.
+
   -- secure handlers
   f:SetAttribute("_childupdate", _childupdate)
   f:SetAttribute("_childupdate-showgrid",_childupdate_showgrid)
@@ -684,6 +686,8 @@
   if attr ~= "statehidden" then
     self:UpdateAction()
   end
+  local f = self:GetFrame()
+  f.action = f:GetAttribute("action") -- support ActionButton_UpdateFlyout
 end
 
 function Action:PostClick( )