From cbaed963642a68ae7bbbec99f90a2b80935a710c Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 15 Oct 2010 09:26:27 +0100 Subject: [PATCH] Fix an issue where setting a new profile did not change profile on next reload --- Clique.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Clique.lua b/Clique.lua index 2cc8ce1..b12b812 100755 --- a/Clique.lua +++ b/Clique.lua @@ -515,16 +515,18 @@ function addon:TalentGroupChanged() local currentProfile = self.db:GetCurrentProfile() local newProfile - -- Determine which profile to set, based on talent group - self.talentGroup = GetActiveTalentGroup() - if self.talentGroup == 1 and self.settings.pri_profileKey then - newProfile = self.settings.pri_profileKey - elseif self.talentGroup == 2 and self.settings.sec_profileKey then - newProfile = self.settings.sec_profileKey - end + if self.settings.specswap then + -- Determine which profile to set, based on talent group + self.talentGroup = GetActiveTalentGroup() + if self.talentGroup == 1 and self.settings.pri_profileKey then + newProfile = self.settings.pri_profileKey + elseif self.talentGroup == 2 and self.settings.sec_profileKey then + newProfile = self.settings.sec_profileKey + end - if newProfile ~= currentProfile and type(newProfile) == "string" then - self.db:SetProfile(newProfile) + if newProfile ~= currentProfile and type(newProfile) == "string" then + self.db:SetProfile(newProfile) + end end self:UpdateEverything() -- 1.7.9.5