From a5dc93e14aba4e70e67ad0849c596c6b31a1ae69 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Mon, 22 Mar 2010 22:44:55 -0400 Subject: [PATCH] in MainPanel:SetProfession(): Added assignment of previous profession if the current one is different. --- Frame.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Frame.lua b/Frame.lua index 1acf5e9..585b28b 100644 --- a/Frame.lua +++ b/Frame.lua @@ -1036,6 +1036,8 @@ do local MINING_SPELL = GetSpellInfo(32606) function MainPanel:SetProfession() + local prev_profession = self.profession + if Player.current_prof == MINING_SPELL then self.profession = 11 -- Smelting else @@ -1046,6 +1048,10 @@ do end end end + + if self.profession ~= prev_profession then + self.prev_profession = prev_profession + end self.mode_button:ChangeTexture(SORTED_PROFESSIONS[self.profession].texture) end end -- 1.7.9.5