Quantcast

Changed OnClick script for the mode_button to automatically switch to and then scan the appropriate tradeskill. If the window was not visible before switching, hide it. No more annoying "You have not yet scanned this tradeskill" message.

torhal [11-12-09 - 07:51]
Changed OnClick script for the mode_button to automatically switch to and then scan the appropriate tradeskill. If the window was not visible before switching, hide it. No more annoying "You have not yet scanned this tradeskill" message.
Filename
ARLFrame.lua
diff --git a/ARLFrame.lua b/ARLFrame.lua
index 453fe6b..7a571f2 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -3184,6 +3184,13 @@ function addon:InitializeFrame()
 					     playerData.playerProfession = SortedProfessions[currentProfIndex].name
 					     currentProfession = playerData.playerProfession

+					     local is_shown = TradeSkillFrame:IsVisible()
+					     CastSpellByName(currentProfession)
+					     addon:Scan()
+
+					     if not is_shown then
+						     TradeSkillFrame:Hide()
+					     end
 					     -- Lets get the new skill level
 					     -- Expand all headers first