From 622eb23b78b5c20e3be6c490fda1f0af8e5e6256 Mon Sep 17 00:00:00 2001 From: Ahmil Jilani Date: Thu, 16 Oct 2014 18:25:03 -0400 Subject: [PATCH] Dealing with the fact that GetChecked now returns a boolean instead of a 1nil. Fixes Expand/Collapse All button and Different Name on Button checkbox --- SuperDuperMacro/SuperDuperMacro_Frames.lua | 2 +- SuperDuperMacro/SuperDuperMacro_Interface.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SuperDuperMacro/SuperDuperMacro_Frames.lua b/SuperDuperMacro/SuperDuperMacro_Frames.lua index 8fb03ba..92be6cf 100644 --- a/SuperDuperMacro/SuperDuperMacro_Frames.lua +++ b/SuperDuperMacro/SuperDuperMacro_Frames.lua @@ -750,7 +750,7 @@ function sdm_CreateDefaultMacroFrameButtons() f:SetHeight(20) f:SetPoint("TOPLEFT", 25, -18) f:SetScript("OnClick", function() - sdm_buttonTextCheckBoxClicked(MacroPopupFrame_buttonTextCheckBox:GetChecked()==1) + sdm_buttonTextCheckBoxClicked(MacroPopupFrame_buttonTextCheckBox:GetChecked()) end) f:Hide() diff --git a/SuperDuperMacro/SuperDuperMacro_Interface.lua b/SuperDuperMacro/SuperDuperMacro_Interface.lua index 7727c77..93d2f82 100644 --- a/SuperDuperMacro/SuperDuperMacro_Interface.lua +++ b/SuperDuperMacro/SuperDuperMacro_Interface.lua @@ -697,7 +697,7 @@ function sdm_ChangeIconOkayed() local oldIcon = mTab.icon mTab.name = nameInputted sdm_ChangeContainer(mTab, mTab.container) --place the item in itself. This is so that it gets re-sorted. - if MacroPopupFrame_buttonTextCheckBox:GetChecked()==1 then + if MacroPopupFrame_buttonTextCheckBox:GetChecked() then mTab.buttonName = MacroPopupEditBox:GetText() if mTab.buttonName=="" then mTab.buttonName=" " @@ -738,7 +738,7 @@ function sdm_buttonTextCheckBoxClicked(checked) end function sdm_CollapseAllButtonClicked(self) - local allOpenOrClosed = self:GetChecked()==nil + local allOpenOrClosed = not self:GetChecked() for _,v in ipairs(sdm_macros) do if v.type=="c" then v.open = allOpenOrClosed -- 1.7.9.5