diff --git a/Applications.cfg b/Applications.cfg index 82e1ea25..9ac90dac 100644 --- a/Applications.cfg +++ b/Applications.cfg @@ -301,7 +301,7 @@ url="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/lib/GUI.lua", type="Library", preloadFile=true, - version=1.66, + version=1.67, }, { path="/lib/rayEngine.lua", diff --git a/lib/GUI.lua b/lib/GUI.lua index 9a1489a5..8886e800 100755 --- a/lib/GUI.lua +++ b/lib/GUI.lua @@ -1190,7 +1190,7 @@ local function treeViewUpdateFileList(treeView) end local function treeViewDraw(treeView) - local y = treeView.y + 1 + local y = treeView.y local showScrollBar = #treeView.fileList > treeView.height local textLimit = treeView.width - (showScrollBar and 2 or 1) @@ -1213,7 +1213,9 @@ local function treeViewDraw(treeView) end y = y + 1 - if y > treeView.y + treeView.height - 2 then break end + if y > treeView.y + treeView.height - 1 then + break + end end if showScrollBar then @@ -1237,7 +1239,7 @@ end local function treeViewEventHandler(mainContainer, object, eventData) if eventData[1] == "touch" then - local fileIndex = eventData[4] - object.y + object.fromFile - 1 + local fileIndex = eventData[4] - object.y + object.fromFile if object.fileList[fileIndex] then if object.fileList[fileIndex].isDirectory then if object.directoriesToShowContent[object.fileList[fileIndex].path] then