From 4c18c7a38e9fc0c72fba3142bd3cb328aa899088 Mon Sep 17 00:00:00 2001 From: Buds Date: Sun, 8 Oct 2023 21:34:29 +0200 Subject: [PATCH] dynamicgroup: fix set anchor to parent with anchor per unit fix #4633 --- WeakAuras/RegionTypes/DynamicGroup.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/WeakAuras/RegionTypes/DynamicGroup.lua b/WeakAuras/RegionTypes/DynamicGroup.lua index cffc9800fd..06b6891314 100644 --- a/WeakAuras/RegionTypes/DynamicGroup.lua +++ b/WeakAuras/RegionTypes/DynamicGroup.lua @@ -1363,7 +1363,15 @@ local function modify(parent, region, data) controlPoint:SetShown(show and frame ~= WeakAuras.HiddenFrames) controlPoint:SetWidth(regionData.dimensions.width) controlPoint:SetHeight(regionData.dimensions.height) - if (data.anchorFrameParent or data.anchorFrameParent == nil) and not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE") and not data.useAnchorPerUnit then + if (data.anchorFrameParent or data.anchorFrameParent == nil) + and ( + data.useAnchorPerUnit + or ( + not data.useAnchorPerUnit + and not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE") + ) + ) + then controlPoint:SetParent(frame == "" and self.relativeTo or frame) else controlPoint:SetParent(self)