From bfd43bdb5b01a0184cd119b6fbe627f10fe56f00 Mon Sep 17 00:00:00 2001 From: Jim Whitehead Date: Sun, 21 Feb 2021 12:30:55 +0100 Subject: [PATCH] Fix a taint issue relating to the spellbook This should prevent certain errors that show Clique as being blocked for showing action buttons and other odd behaviour. --- Clique.lua | 4 ++-- Clique.xml | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Clique.lua b/Clique.lua index ed6add5..9fd6e94 100755 --- a/Clique.lua +++ b/Clique.lua @@ -267,7 +267,7 @@ function addon:UnregisterFrame(button) self.ccframes[button] = nil - -- Unwrap the OnEnter/OnLeave scripts, if they were set + -- Unwrap the OnEnter/OnLeave scripts, if they w/conere set addon.header:UnwrapScript(button, "OnEnter") addon.header:UnwrapScript(button, "OnLeave") end @@ -513,7 +513,7 @@ function addon:GetClickAttributes(global) bits[#bits + 1] = ATTR(indent, prefix, "type", suffix, entry.type) rembits[#rembits + 1] = REMATTR(prefix, "type", suffix) elseif entry.type == "menu" then - set_text = ATTR(indent, prefix, "type", suffix, "togglemenu") + local set_text = ATTR(indent, prefix, "type", suffix, "togglemenu") bits[#bits + 1] = string.gsub(set_text, '"togglemenu"', 'button:GetAttribute("*type2") == "menu" and "menu" or "togglemenu"') rembits[#rembits + 1] = REMATTR(prefix, "type", suffix) elseif entry.type == "spell" and self.settings.stopcastingfix then diff --git a/Clique.xml b/Clique.xml index 9fadcca..7d808b5 100755 --- a/Clique.xml +++ b/Clique.xml @@ -88,9 +88,7 @@ local parent = self:GetParent() - if Clique:APIIsTrue(parent:IsEnabled()) then - SpellButton_OnEnter(parent) - else + if not Clique:APIIsTrue(parent:IsEnabled()) then self:GetHighlightTexture():Hide() end @@ -304,7 +302,9 @@ - WhoFrameColumn_SetWidth(self, 203); + local width = 203 + self:SetWidth(width); + _G[self:GetName().."Middle"]:SetWidth(width - 9); @@ -316,7 +316,9 @@ - WhoFrameColumn_SetWidth(self, 120); + local width = 120 + self:SetWidth(width); + _G[self:GetName().."Middle"]:SetWidth(width - 9); -- 1.7.9.5