Quantcast

Fix a taint issue relating to the spellbook

Jim Whitehead [02-21-21 - 11:30]
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.
Filename
Clique.lua
Clique.xml
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 @@
         <Scripts>
             <OnEnter>
                 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 @@
                         </Anchors>
                         <Scripts>
                             <OnLoad>
-                                WhoFrameColumn_SetWidth(self, 203);
+                                local width = 203
+                                self:SetWidth(width);
+	                            _G[self:GetName().."Middle"]:SetWidth(width - 9);
                             </OnLoad>
                         </Scripts>
                     </Button>
@@ -316,7 +316,9 @@
                         </Anchors>
                         <Scripts>
                             <OnLoad>
-                                WhoFrameColumn_SetWidth(self, 120);
+                                local width = 120
+                                self:SetWidth(width);
+	                            _G[self:GetName().."Middle"]:SetWidth(width - 9);
                             </OnLoad>
                         </Scripts>
                         <ButtonText>