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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user