Skip to content

Commit

Permalink
Fixing display bug in new disable tooltip option for private-auras ic…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
michaelnpsp committed Oct 2, 2024
1 parent 1830aef commit 9dd05b2
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions modules/IndicatorPrivateAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ local AddPrivateAuraAnchor = C_UnitAuras.AddPrivateAuraAnchor
local RemovePrivateAuraAnchor = C_UnitAuras.RemovePrivateAuraAnchor
if not AddPrivateAuraAnchor then return end

local function AcquireTooltipFrame()
GetHideTooltipFrame = function() tooltipFrame:Show(); return tooltipFrame end
tooltipFrame = CreateFrame("Frame", nil , Grid2LayoutFrame)
tooltipFrame:SetFrameStrata("TOOLTIP")
tooltipFrame:SetFrameLevel(255)
return tooltipFrame
end

local function ReleaseTooltipFrame()
if tooltipFrame then tooltipFrame:Hide() end
return nil
end

local function ClearFrameAuraAnchors(f)
local auraHandles = f.auraHandles
for i=1,#auraHandles do
Expand Down Expand Up @@ -99,14 +112,7 @@ local function Icon_UpdateDB(self)
self.colCount = self.maxIcons
self.rowCount = 1
end
if dbx.disableTooltip then
tooltipFrame = tooltipFrame or CreateFrame("Frame")
self.tooltipFrame = tooltipFrame
tooltipFrame:Show()
else
self.tooltipFrame = nil
if tooltipFrame then tooltipFrame:Hide() end
end
self.tooltipFrame = dbx.disableTooltip and AcquireTooltipFrame() or ReleaseTooltipFrame()
end

Grid2.setupFunc["privateauras"] = function(indicatorKey, dbx)
Expand Down

0 comments on commit 9dd05b2

Please sign in to comment.