Skip to content

Commit 1a9b745

Browse files
github-actions[bot]PeecheyLocalIdentity
authored
[pob1-port] Fix buggy tooltip for Equipped Items (#1589)
* Apply changes from PathOfBuildingCommunity/PathOfBuilding#9290 * Fix merge conflict --------- Co-authored-by: Peechey <[email protected]> Co-authored-by: LocalIdentity <[email protected]>
1 parent fef7fdd commit 1a9b745

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Classes/ItemSlotControl.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ local ItemSlotClass = newClass("ItemSlotControl", "DropDownControl", function(se
5858
self.socketList = { }
5959
self.tooltipFunc = function(tooltip, mode, index, itemId)
6060
local item = itemsTab.items[self.items[index]]
61-
if main.popups[1] or mode == "OUT" or not item or (not self.dropped and itemsTab.selControl and itemsTab.selControl ~= self.controls.activate) then
62-
tooltip:Clear()
61+
-- not selControl.ListControl allows hover when All Items or Unique/Rare DB Sections are in focus
62+
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
63+
tooltip:Clear(true)
6364
elseif tooltip:CheckForUpdate(item, launch.devModeAlt, itemsTab.build.outputRevision) then
6465
itemsTab:AddItemTooltip(tooltip, item, self)
6566
end

src/Classes/Tooltip.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ local TooltipClass = newClass("Tooltip", function(self)
2121
self:Clear()
2222
end)
2323

24-
function TooltipClass:Clear()
24+
function TooltipClass:Clear(clearUpdateParams)
2525
wipeTable(self.lines)
2626
wipeTable(self.blocks)
27+
if self.updateParams and clearUpdateParams then
28+
wipeTable(self.updateParams)
29+
end
2730
self.tooltipHeader = false
2831
self.titleYOffset = 0
2932
self.recipe = nil

0 commit comments

Comments
 (0)