From b6d3941f0f8c41997634ae58bb7a8ca72a7d9221 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Thu, 3 Jun 2010 07:51:25 -0400 Subject: [PATCH] In addon:Scan() - Check for current_prof being "UNKNOWN" instead of checking the scan_button's parent to determine if a tradeskill frame is open. --- ARL.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ARL.lua b/ARL.lua index 7783d4e..b9cd51d 100644 --- a/ARL.lua +++ b/ARL.lua @@ -1777,15 +1777,13 @@ do -- @param textdump Boolean indicating if we want the output to be a text dump, or if we want to use the ARL GUI -- @return A frame with either the text dump, or the ARL frame function addon:Scan(textdump, is_refresh) - local scan_parent = self.scan_button:GetParent() + local current_prof, prof_level = GetTradeSkillLine() - -- 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 scan_parent == UIParent or not scan_parent:IsVisible() then + -- Bail if we haven't opened a tradeskill frame. + if current_prof == "UNKNOWN" then self:Print(L["OpenTradeSkillWindow"]) return end - local current_prof, prof_level = GetTradeSkillLine() -- Set the current profession and its level, and update the cached data. Player.current_prof = current_prof -- 1.7.9.5