From 0c041d7e0ac8228935cf17f0e22193b930a1f440 Mon Sep 17 00:00:00 2001 From: Kenny Shields Date: Sun, 3 Aug 2014 15:11:53 -0400 Subject: [PATCH] Adjust columnlist row colors when calling columnlistarea:RedoLayout() --- objects/internal/columnlist/columnlistarea.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/objects/internal/columnlist/columnlistarea.lua b/objects/internal/columnlist/columnlistarea.lua index 98c0c4e..520071c 100644 --- a/objects/internal/columnlist/columnlistarea.lua +++ b/objects/internal/columnlist/columnlistarea.lua @@ -264,6 +264,7 @@ function newobject:RedoLayout() local display = self.display if #children > 0 then + self.rowcolorindex = 1 for k, v in ipairs(children) do local height = v.height v.staticx = startx @@ -277,6 +278,12 @@ function newobject:RedoLayout() end starty = starty + 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