Minor fixes and add auto resize for images

This commit is contained in:
Eduardo Bart
2013-03-15 21:59:10 -03:00
parent a3a65d40ce
commit b43a196eac
6 changed files with 30 additions and 8 deletions

View File

@@ -257,10 +257,13 @@ function flushLines()
for _,line in pairs(cachedLines) do
-- delete old lines if needed
if numLines > MaxLogLines then
local len = #terminalBuffer:getChildByIndex(1):getText()
terminalBuffer:getChildByIndex(1):destroy()
table.remove(allLines, 1)
fulltext = string.sub(fulltext, len)
local firstChild = terminalBuffer:getChildByIndex(1)
if firstChild then
local len = #firstChild:getText()
firstChild:destroy()
table.remove(allLines, 1)
fulltext = string.sub(fulltext, len)
end
end
local label = g_ui.createWidget('TerminalLabel', terminalBuffer)

View File

@@ -110,7 +110,9 @@ function UITabBar:selectTab(tab)
tab:setOn(false)
local parent = tab:getParent()
parent:focusChild(tab, MouseFocusReason)
if parent then
parent:focusChild(tab, MouseFocusReason)
end
end
function UITabBar:selectNextTab()