Fix buggy tooltip for Equipped Items (#9290)

* fix tooltip sometimes not showing in ItemsTab on dropdown items

* comments, remove console logs
This commit is contained in:
Peechey
2025-11-22 00:29:03 -06:00
committed by GitHub
parent fa43a7b281
commit 199ace08b2
2 changed files with 7 additions and 3 deletions

View File

@@ -46,8 +46,9 @@ local ItemSlotClass = newClass("ItemSlotControl", "DropDownControl", function(se
self.abyssalSocketList = { }
self.tooltipFunc = function(tooltip, mode, index, itemId)
local item = itemsTab.items[self.items[index]]
if main.popups[1] or mode == "OUT" or not item or (not self.dropped and itemsTab.selControl and itemsTab.selControl ~= self.controls.activate) then
tooltip:Clear()
-- not selControl.ListControl allows hover when All Items or Unique/Rare DB Sections are in focus
if main.popups[1] or mode == "OUT" or not item or (not self.dropped and itemsTab.selControl and itemsTab.selControl ~= self.controls.activate and not itemsTab.selControl.ListControl) then
tooltip:Clear(true)
elseif tooltip:CheckForUpdate(item, launch.devModeAlt, itemsTab.build.outputRevision) then
itemsTab:AddItemTooltip(tooltip, item, self)
end

View File

@@ -46,9 +46,12 @@ local TooltipClass = newClass("Tooltip", function(self)
self:Clear()
end)
function TooltipClass:Clear()
function TooltipClass:Clear(clearUpdateParams)
wipeTable(self.lines)
wipeTable(self.blocks)
if self.updateParams and clearUpdateParams then
wipeTable(self.updateParams)
end
self.tooltipHeader = false
self.titleYOffset = 0
self.recipe = nil