Skip to content

Commit 9bb9b39

Browse files
committed
apply 30365b to old dynamic group
1 parent c271229 commit 9bb9b39

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

WeakAuras/RegionTypes/DynamicGroupOld.lua

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ local function create(parent)
116116
region.controlPoints.parent = region
117117
WeakAuras.regionPrototype.create(region)
118118
region.suspended = 0
119+
120+
local oldSetFrameLevel = region.SetFrameLevel
121+
region.SetFrameLevel = function(self, level)
122+
oldSetFrameLevel(self, level)
123+
self.border:SetFrameLevel(level)
124+
end
125+
119126
return region
120127
end
121128

@@ -1205,22 +1212,20 @@ local function modify(parent, region, data)
12051212
-- if self.dynamicAnchor then self:UpdateBorder(); return end
12061213
Private.StartProfileSystem("dynamicgroup")
12071214
Private.StartProfileAura(data.id)
1208-
local numVisible, minX, maxX, maxY, minY, minLevel = 0
1215+
local numVisible, minX, maxX, maxY, minY = 0
12091216
for active, regionData in ipairs(self.sortedChildren) do
12101217
if regionData.shown then
12111218
numVisible = numVisible + 1
12121219
local childRegion = regionData.region
12131220
local regionLeft, regionRight, regionTop, regionBottom
12141221
= SafeGetPos(childRegion, childRegion.GetLeft), SafeGetPos(childRegion, childRegion.GetRight),
12151222
SafeGetPos(childRegion, childRegion.GetTop), SafeGetPos(childRegion, childRegion.GetBottom)
1216-
local frameLevel = childRegion:GetFrameLevel()
12171223

1218-
if(regionLeft and regionRight and regionTop and regionBottom and frameLevel) then
1224+
if(regionLeft and regionRight and regionTop and regionBottom) then
12191225
minX = minX and min(regionLeft, minX) or regionLeft
12201226
maxX = maxX and max(regionRight, maxX) or regionRight
12211227
minY = minY and min(regionBottom, minY) or regionBottom
12221228
maxY = maxY and max(regionTop, maxY) or regionTop
1223-
minLevel = minLevel and min(frameLevel, minLevel) or frameLevel
12241229
end
12251230
end
12261231
end
@@ -1237,7 +1242,6 @@ local function modify(parent, region, data)
12371242
self:SetHeight(height)
12381243
self.currentWidth = width
12391244
self.currentHeight = height
1240-
self.background:SetFrameLevel(minLevel and minLevel - 1 or 0)
12411245
else
12421246
self:Hide()
12431247
end

0 commit comments

Comments
 (0)