mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 15:46:56 +00:00
skin: check values before comparing them
This fixes an addon conflict with aero [1], which is used to animate frames, causing them to have invalid GetRight() values for a short amount of time. [1] https://github.com/gashole/Aero
This commit is contained in:
+4
-1
@@ -4,12 +4,15 @@ pfUI:RegisterModule("skin", "vanilla:tbc", function ()
|
||||
pfUI.panelalign:SetScript("OnUpdate", function()
|
||||
local left = UIParent.left
|
||||
local center = UIParent.center
|
||||
local rbpos, ropos
|
||||
|
||||
-- detect outer frame backdrops
|
||||
if left and not left.rightObj then
|
||||
left.rightObj = left.backdrop or left
|
||||
for _, frame in pairs({left:GetChildren()}) do
|
||||
if frame.backdrop and frame.backdrop.GetRight and frame.backdrop:GetRight() > left.rightObj:GetRight() then
|
||||
rbpos = frame.backdrop and frame.backdrop.GetRight and frame.backdrop:GetRight()
|
||||
ropos = left.rightObj and left.rightObj.GetRight and left.rightObj:GetRight()
|
||||
if rbpos and ropos and rbpos > ropos then
|
||||
left.rightObj = frame.backdrop
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user