Adjust columnlist row colors when calling columnlistarea:RedoLayout()

This commit is contained in:
Kenny Shields 2014-08-03 15:11:53 -04:00
parent 8db876d3a8
commit 0c041d7e0a

View File

@ -264,6 +264,7 @@ function newobject:RedoLayout()
local display = self.display local display = self.display
if #children > 0 then if #children > 0 then
self.rowcolorindex = 1
for k, v in ipairs(children) do for k, v in ipairs(children) do
local height = v.height local height = v.height
v.staticx = startx v.staticx = startx
@ -277,6 +278,12 @@ function newobject:RedoLayout()
end end
starty = starty + v.height starty = starty + v.height
v.lastheight = v.height v.lastheight = v.height
v.colorindex = self.rowcolorindex
if self.rowcolorindex == self.rowcolorindexmax then
self.rowcolorindex = 1
else
self.rowcolorindex = self.rowcolorindex + 1
end
end end
end end