Quantcast

Merged addon:ToggleExcludeRecipe() into RecipeItem_OnClick() since it was only ever used there.

James D. Callahan III [03-09-10 - 14:16]
Merged addon:ToggleExcludeRecipe() into RecipeItem_OnClick() since it was only ever used there.
Filename
ARL.lua
Frame.lua
diff --git a/ARL.lua b/ARL.lua
index c75d7a2..2e98818 100644
--- a/ARL.lua
+++ b/ARL.lua
@@ -1634,15 +1634,6 @@ do
 end

 -------------------------------------------------------------------------------
--- Recipe Exclusion Functions
--------------------------------------------------------------------------------
----Removes or adds a recipe to the exclusion list.
-function addon:ToggleExcludeRecipe(SpellID)
-	local exclusion_list = addon.db.profile.exclusionlist
-
-	exclusion_list[SpellID] = (not exclusion_list[SpellID] and true or nil)
-end
-
 ---Prints all the ID's in the exclusion list out into chat.
 function addon:ViewExclusionList()
 	local exclusion_list = addon.db.profile.exclusionlist
diff --git a/Frame.lua b/Frame.lua
index 66d051f..128539b 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -3601,8 +3601,10 @@ function addon:InitializeFrame()
 				elseif IsControlKeyDown() then
 					ChatFrameEditBox:Insert(private.recipe_list[clicked_line.recipe_id].spell_link)
 				elseif IsAltKeyDown() then
-					-- Code needed here to insert this item into the "Ignore List"
-					addon:ToggleExcludeRecipe(clicked_line.recipe_id)
+					local exclusion_list = addon.db.profile.exclusionlist
+					local recipe_id = clicked_line.recipe_id
+
+					exclusion_list[recipe_id] = (not exclusion_list[recipe_id] and true or nil)
 					ReDisplay()
 				end
 			elseif clicked_line.is_header then