Skip to content

editor_gui: Fix the last row not being displayed #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions [editor]/editor_gui/client/browser/browserList.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
browserList = {}
browserList_mt = { __index = browserList }
local activatedBrowsers = {}
local ROW_HEIGHT = 14
local ROW_HEIGHT = 14.1
local keyUp,keyDown,ignore
--NOTE: All functions lack necessary checks to verify valid args, its intended for internal use only
-------
Expand Down Expand Up @@ -59,7 +59,7 @@ local function updateActivatedBrowsers()
local targetKey = startKey + self.gridlistRowCount - 1
--set the text
local i = startKey
while i ~= targetKey do
while i <= targetKey do
rowColumns = self.rowList[i]
if type(rowColumns) == "table" then
local pos = guiGridListAddRow ( self.gridlist )
Expand Down Expand Up @@ -192,7 +192,7 @@ function browserList:setRows(rowTable)
self.currentStartKey = 1
self.rowCount = #rowTable --total number of rows
self.rowList = rowTable
self.scrollDistance = self.rowCount - self.gridlistRowCount
self.scrollDistance = self.rowCount - self.gridlistRowCount + 1
if self.scrollDistance == 0 then
self.scrollDistance = 1
end
Expand Down Expand Up @@ -220,7 +220,7 @@ function browserList:setRows(rowTable)
end
local i = 1
local target = self.gridlistRowCount + 2
while i ~= target do
while i <= target do
local rowColumns = rowTable[i]
if type(rowColumns) == "table" then
local pos = guiGridListAddRow ( self.gridlist )
Expand Down