From 76e1442161affd237e49bdbe1bfde787cf920f6d Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Thu, 2 May 2024 22:17:35 -0700 Subject: [PATCH] Fixed a rendering bug where sections would remain on screen if user scale was 100%. --- frames/section.lua | 1 + views/gridview.lua | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/frames/section.lua b/frames/section.lua index 3f12f957..0a578ab8 100644 --- a/frames/section.lua +++ b/frames/section.lua @@ -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) diff --git a/views/gridview.lua b/views/gridview.lua index 63346ea0..24bc072f 100644 --- a/views/gridview.lua +++ b/views/gridview.lua @@ -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.