Quantcast

In ClearRecipeButtonTooltip(): Set all button scripts to nil, instead of an empty anonymous function.

torhal [09-07-09 - 04:53]
In ClearRecipeButtonTooltip(): Set all button scripts to nil, instead of an empty anonymous function.
Filename
ARLFrame.lua
diff --git a/ARLFrame.lua b/ARLFrame.lua
index 027dba9..c47f246 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -853,14 +853,13 @@ end


 local function ClearRecipeButtonTooltip(bIndex)
-
 	local pButton = addon.PlusListButton[bIndex]
 	local rButton = addon.RecipeListButton[bIndex]
-	pButton:SetScript("OnEnter", function () end)
-	pButton:SetScript("OnLeave", function () end)
-	rButton:SetScript("OnEnter", function () end)
-	rButton:SetScript("OnLeave", function () end)

+	pButton:SetScript("OnEnter", nil)
+	pButton:SetScript("OnLeave", nil)
+	rButton:SetScript("OnEnter", nil)
+	rButton:SetScript("OnLeave", nil)
 end

 -- Description: Converting from hex to rgb (Thanks Maldivia)