Skip to content

Commit

Permalink
Fixed some tooltip issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed Mar 18, 2024
1 parent 74b1e5f commit dda7bc1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frames/classic/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ function itemFrame.itemProto:SetItem(data)
self.button:CheckUpdateTooltip(tooltipOwner)
self.button:SetMatchesSearch(not isFiltered)
--]]
self.freeSlotName = ""
self.freeSlotCount = 0
self.isFreeSlot = nil
self:SetAlpha(1)
events:SendMessage('item/Updated', self)
self.frame:Show()
Expand Down
4 changes: 4 additions & 0 deletions frames/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ end
function itemFrame.itemProto:OnEnter()
if not self.isFreeSlot then return end
if not self.freeSlotName or self.freeSlotName == "" then return end
if self.freeSlotCount == -1 then return end

itemFrame.emptyItemTooltip:SetOwner(self.frame, "ANCHOR_NONE")
ContainerFrameItemButton_CalculateItemTooltipAnchors(self.frame, itemFrame.emptyItemTooltip)
Expand Down Expand Up @@ -376,6 +377,9 @@ function itemFrame.itemProto:SetItem(data)
self.button:CheckUpdateTooltip(tooltipOwner)
self.button:SetMatchesSearch(not isFiltered)

self.freeSlotName = ""
self.freeSlotCount = 0
self.isFreeSlot = nil
self:SetAlpha(1)
events:SendMessage('item/Updated', self)
self.frame:Show()
Expand Down
2 changes: 1 addition & 1 deletion views/bagview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ local function BagView(view, bag, slotInfo)
itemButton = itemFrame:Create()
view.itemsByBagAndSlot[slotkey] = itemButton
end
itemButton:SetFreeSlots(bagid, slotid, -1, const.BACKPACK_ONLY_REAGENT_BAGS[bagid] ~= nil)
itemButton:SetFreeSlots(bagid, slotid, -1, C_Container.GetBagName(bagid))
local section = view:GetOrCreateSection(GetBagName(bagid))
section:AddCell(slotkey, itemButton)
end
Expand Down

0 comments on commit dda7bc1

Please sign in to comment.