Skip to content

Commit 8b49c3a

Browse files
authored
editor_gui: Fix the last row not being displayed (#654)
Fixes issue where the last row isn't displayed, and increases row height for bigger screens
1 parent 2b051f1 commit 8b49c3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

[editor]/editor_gui/client/browser/browserList.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
browserList = {}
22
browserList_mt = { __index = browserList }
33
local activatedBrowsers = {}
4-
local ROW_HEIGHT = 14
4+
local ROW_HEIGHT = 14.1
55
local keyUp,keyDown,ignore
66
--NOTE: All functions lack necessary checks to verify valid args, its intended for internal use only
77
-------
@@ -59,7 +59,7 @@ local function updateActivatedBrowsers()
5959
local targetKey = startKey + self.gridlistRowCount - 1
6060
--set the text
6161
local i = startKey
62-
while i ~= targetKey do
62+
while i <= targetKey do
6363
rowColumns = self.rowList[i]
6464
if type(rowColumns) == "table" then
6565
local pos = guiGridListAddRow ( self.gridlist )
@@ -192,7 +192,7 @@ function browserList:setRows(rowTable)
192192
self.currentStartKey = 1
193193
self.rowCount = #rowTable --total number of rows
194194
self.rowList = rowTable
195-
self.scrollDistance = self.rowCount - self.gridlistRowCount
195+
self.scrollDistance = self.rowCount - self.gridlistRowCount + 1
196196
if self.scrollDistance == 0 then
197197
self.scrollDistance = 1
198198
end
@@ -220,7 +220,7 @@ function browserList:setRows(rowTable)
220220
end
221221
local i = 1
222222
local target = self.gridlistRowCount + 2
223-
while i ~= target do
223+
while i <= target do
224224
local rowColumns = rowTable[i]
225225
if type(rowColumns) == "table" then
226226
local pos = guiGridListAddRow ( self.gridlist )

0 commit comments

Comments
 (0)