(fix/DynamicGroup): delay Resize to next frame to fix child positioning
(cherry picked from commit 01121291e8a486bd74568e71e4aebe8442e54de4)
This commit is contained in:
@@ -1049,6 +1049,28 @@ local function clearCache(cache, id, cloneId)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Resize queue
|
||||||
|
local RunNextFrame = CreateFrame("Frame")
|
||||||
|
local q = {}
|
||||||
|
RunNextFrame:Hide()
|
||||||
|
|
||||||
|
function QueueResize(g)
|
||||||
|
if not g then return end
|
||||||
|
q[#q+1] = g
|
||||||
|
RunNextFrame:Show()
|
||||||
|
end
|
||||||
|
|
||||||
|
RunNextFrame:SetScript("OnUpdate", function(self)
|
||||||
|
self:Hide()
|
||||||
|
for i = 1, #q do
|
||||||
|
local g = q[i]
|
||||||
|
q[i] = nil
|
||||||
|
if g and g.Resize then
|
||||||
|
g:Resize()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
local function modify(parent, region, data)
|
local function modify(parent, region, data)
|
||||||
Private.FixGroupChildrenOrderForGroup(data)
|
Private.FixGroupChildrenOrderForGroup(data)
|
||||||
region:SetScale(data.scale and data.scale > 0 and data.scale <= 10 and data.scale or 1)
|
region:SetScale(data.scale and data.scale > 0 and data.scale <= 10 and data.scale or 1)
|
||||||
@@ -1528,7 +1550,7 @@ local function modify(parent, region, data)
|
|||||||
|
|
||||||
Private.StopProfileSystem("dynamicgroup")
|
Private.StopProfileSystem("dynamicgroup")
|
||||||
Private.StopProfileAura(data.id)
|
Private.StopProfileAura(data.id)
|
||||||
self:Resize()
|
QueueResize(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user