Avoid even more taint in the actionbutton onevent to potentially stop breaking the totem bar.
This commit is contained in:
+6
-11
@@ -351,17 +351,12 @@ function Button:ToggleButtonElements()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
orig_ActionButton_UpdateHotkeys = ActionButton_UpdateHotkeys
|
hooksecurefunc("ActionButton_UpdateHotkeys", function(self, ...)
|
||||||
ActionButton_UpdateHotkeys = function(self, ...)
|
local parent = self:GetParent()
|
||||||
local name = self:GetName()
|
if not self.BT4init or not parent.BT4BarType then return end
|
||||||
if name and name:find("^BT4Button") then
|
|
||||||
if self.BT4init then
|
self:UpdateHotkeys()
|
||||||
self:UpdateHotkeys()
|
end)
|
||||||
end
|
|
||||||
else
|
|
||||||
orig_ActionButton_UpdateHotkeys(self, ...)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Button:UpdateHotkeys()
|
function Button:UpdateHotkeys()
|
||||||
local key = self:GetHotkey() or ""
|
local key = self:GetHotkey() or ""
|
||||||
|
|||||||
Reference in New Issue
Block a user