Skip to content

Commit

Permalink
Fixed a bug when selling items with show all free slots.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed Aug 2, 2024
1 parent b6934ac commit 30376c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions views/gridview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ local function GridView(view, ctx, bag, slotInfo)
freeSlotsSection:WipeOnlyContents()
for bagid, data in pairs(slotInfo.emptySlotByBagAndSlot) do
for slotid, item in pairs(data) do
local itemButton = view:GetOrCreateItemButton(item.slotkey)
itemButton:SetFreeSlots(bagid, slotid, 1, true)
freeSlotsSection:AddCell(item.slotkey, itemButton)
if not view:GetDeferredItems()[item.slotkey] then
local itemButton = view:GetOrCreateItemButton(item.slotkey)
itemButton:SetFreeSlots(bagid, slotid, 1, true)
freeSlotsSection:AddCell(item.slotkey, itemButton)
end
end
end
freeSlotsSection:Draw(bag.kind, database:GetBagView(bag.kind), true, true)
Expand Down

0 comments on commit 30376c5

Please sign in to comment.