Skip to content

Commit

Permalink
Fixed a rendering bug where sections would remain on screen if user s…
Browse files Browse the repository at this point in the history
…cale was 100%.
  • Loading branch information
Cidan committed May 3, 2024
1 parent 66a461f commit 76e1442
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
1 change: 1 addition & 0 deletions frames/section.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ end

function sectionProto:Wipe()
self.content:Wipe()
self.frame:Hide()
self.view = const.BAG_VIEW.SECTION_GRID
self.frame:ClearAllPoints()
self.frame:SetParent(nil)
Expand Down
18 changes: 0 additions & 18 deletions views/gridview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,6 @@ local function GridView(view, bag, slotInfo)
end
view:ClearDirtySections()
end

--[[
for sectionName, section in pairs(view:GetAllSections()) do
-- Remove the section if it's empty, otherwise draw it.
if not slotInfo.deferDelete then
if section:GetCellCount() == 0 then
debug:Log("RemoveSection", "Removed because empty", sectionName)
view:RemoveSection(sectionName)
section:ReleaseAllCells()
section:Release()
else
debug:Log("KeepSection", "Section kept because not empty", sectionName)
section:SetMaxCellWidth(sizeInfo.itemsPerRow)
section:Draw(bag.kind, database:GetBagView(bag.kind), false)
end
end
end
]]--
debug:EndProfile('Section Draw Stage')

-- Get the free slots section and add the free slots to it.
Expand Down

0 comments on commit 76e1442

Please sign in to comment.