From f7a8448088dc062adc81d89bd3f20c18eea520e5 Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Fri, 1 Dec 2023 10:05:53 -0800 Subject: [PATCH] Fixed a bug that caused items to exist past the length of the bag frame (hopefully!) --- frames/column.lua | 2 +- views/gridview.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frames/column.lua b/frames/column.lua index b36721c2..d7623b0f 100644 --- a/frames/column.lua +++ b/frames/column.lua @@ -113,7 +113,7 @@ function columnProto:Draw(style) else local first = firstCellInRow[#rows] cell.frame:SetPoint("TOPLEFT", first.frame, "BOTTOMLEFT", 0, -4) - h = h + cell.frame:GetHeight() + h = h + cell.frame:GetHeight() + 4 local newRow = #rows + 1 rows[newRow] = {count = cell:GetCellCount(), cells = {cell --[[@as Section]]}} cellToRow[cell] = newRow diff --git a/views/gridview.lua b/views/gridview.lua index 0d6a2b02..3ddb7f1d 100644 --- a/views/gridview.lua +++ b/views/gridview.lua @@ -157,6 +157,8 @@ function views:GridView(bag, dirtyItems) h = 40 end bag.content:HideScrollBar() + --TODO(lobato): Implement SafeSetSize that prevents the window from being larger + -- than the screen space. bag.frame:SetWidth(w + 12) bag.frame:SetHeight(h + 24 + bag.leftHeader:GetHeight() + bag.bottomBar:GetHeight()) end \ No newline at end of file