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
Ahmil Jilani [10-16-14 - 22:25]
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
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