From cf78eba9c0168a56f5c612c5fad4aa4c7d052992 Mon Sep 17 00:00:00 2001 From: torhal Date: Mon, 7 Dec 2009 22:56:19 +0000 Subject: [PATCH] In addon:Scan(): Check if the scan_button's parent is UIParent and, if so, inform the user that a tradeskill window must be opened before scanning. --- AckisRecipeList.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index ff0e3a9..5b20440 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -747,9 +747,9 @@ do end end local scan_button = self.scan_button - local button_parent = scan_button:GetParent() + local scan_parent = self.scan_button:GetParent() - if not button_parent or button_parent == UIParent then + if not scan_parent or scan_parent == UIParent then scan_button:SetParent(TradeSkillFrame) scan_button:ClearAllPoints() @@ -1456,7 +1456,7 @@ do -- The scan button is re-parented to whichever interface it's anchored to, whether it's TradeSkillFrame or a replacement AddOn, -- so we make sure its parent exists and is visible before proceeding. - if not scan_parent or not scan_parent:IsVisible() then + if not scan_parent or scan_parent == UIParent or not scan_parent:IsVisible() then self:Print(L["OpenTradeSkillWindow"]) return end -- 1.7.9.5