mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 18:36:01 +00:00
addonbuttons: treat orphaned frames as top frames
This commit is contained in:
@@ -213,7 +213,7 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function ()
|
||||
end
|
||||
|
||||
local function GetTopFrame(frame)
|
||||
if frame:GetParent() == Minimap or frame:GetParent() == UIParent then
|
||||
if frame:GetParent() == Minimap or frame:GetParent() == UIParent or not frame:GetParent() then
|
||||
return frame
|
||||
else
|
||||
return GetTopFrame(frame:GetParent())
|
||||
@@ -385,7 +385,7 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function ()
|
||||
function pfUI.addonbuttons:ProcessButtons()
|
||||
UpdatePanel()
|
||||
for i, button_name in ipairs(pfUI.addonbuttons.buttons) do
|
||||
if _G[button_name] ~= nil then
|
||||
if _G[button_name] then
|
||||
BackupButton(_G[button_name])
|
||||
MoveButton(i, _G[button_name])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user