From e9ee363dbaf78f09fddac6691e519f1990c794a0 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Fri, 22 Jan 2010 12:34:02 -0600 Subject: [PATCH] Fixed the weights configuration dialog to not collapse any used classes in addition to the player's current class --- weights.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/weights.lua b/weights.lua index 6d162b6..67ae4fc 100644 --- a/weights.lua +++ b/weights.lua @@ -409,13 +409,12 @@ function loadClassButtons() local _, class = UnitClass("player") for _, classFrame in ipairs(ww_weights.leftPanel.scrollFrame.categories) do classFrame.class = revClassLookup[classFrame.text:GetText()] - if classFrame.class ~= class then - classFrame.text:Click() - end + local used = (classFrame.class == class) for i, weightFrame in ipairs({classFrame:GetChildren()}) do if weightFrame.name then if ww_charVars.activeWeights[classFrame.class] then for _, weight in ipairs(ww_charVars.activeWeights[classFrame.class]) do + used = true if weight == weightFrame.name then weightFrame.checkButton:SetChecked(true) break @@ -429,6 +428,9 @@ function loadClassButtons() end end end + if not used then + classFrame.text:Click() + end end end -- 1.7.9.5