Fix display of arrows in lua filtered list widgets

Fixes #718
develop
lethosor 2015-10-30 19:16:29 -04:00
parent 83991d2a22
commit 7da3c65079
2 changed files with 4 additions and 2 deletions

@ -179,6 +179,7 @@ function MaterialDialog:onSelectObj(item)
end
function MaterialDialog:addMaterial(choices, mat, typ, idx, pfix, parent)
if not mat then return end
-- Check the filter
if self.mat_filter and not self.mat_filter(mat, parent, typ, idx) then
return

@ -540,6 +540,7 @@ function List:onRenderBody(dc)
local current = (i == self.selected)
local cur_pen = self.cursor_pen
local cur_dpen = self.text_pen
local active_pen = current and cur_pen or cur_dpen
if not self.active then
cur_pen = self.inactive_pen or self.cursor_pen
@ -549,7 +550,7 @@ function List:onRenderBody(dc)
local icon = getval(obj.icon)
if iw and icon then
dc:seek(0, y)
dc:seek(0, y):pen(active_pen)
paint_icon(icon, obj)
end
@ -565,7 +566,7 @@ function List:onRenderBody(dc)
end
if icon and not iw then
dc:seek(ip-1,y)
dc:seek(ip-1,y):pen(active_pen)
paint_icon(icon, obj)
end
end