Skip to content

Commit

Permalink
dynamicgroup: fix set anchor to parent with anchor per unit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds committed Oct 8, 2023
1 parent cd8f564 commit 22fc4df
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion WeakAuras/RegionTypes/DynamicGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22fc4df

Please sign in to comment.