Quantcast

Added detection for currently-supported TradeSkill AddOns to the mode-button so toggling between tradeskills while the frame is hidden will work.

James D. Callahan III [06-03-10 - 12:10]
Added detection for currently-supported TradeSkill AddOns to the mode-button so toggling between tradeskills while the frame is hidden will work.
Filename
Frame.lua
diff --git a/Frame.lua b/Frame.lua
index 7866de2..852b834 100644
--- a/Frame.lua
+++ b/Frame.lua
@@ -1515,13 +1515,14 @@ MainPanel.mode_button:SetScript("OnClick",
 							end
 						end
 					end
-					local is_shown = TradeSkillFrame:IsVisible()
+					local trade_frame = _G.GnomeWorksFrame or _G.Skillet or _G.MRTSkillFrame or _G.ATSWFrame or _G.CauldronFrame or _G.TradeSkillFrame
+					local is_shown = trade_frame:IsVisible()

 					CastSpellByName(ORDERED_PROFESSIONS[MainPanel.profession])
 					addon:Scan()

 					if not is_shown then
-						TradeSkillFrame:Hide()
+						trade_frame:Hide()
 					end
 				end)