fix(color): Lua LVGL line color not set correctly when 'pts' property is a function (#6270)
This commit is contained in:
@@ -800,11 +800,16 @@ bool LvglWidgetLine::callRefs(lua_State *L)
|
||||
int t = lua_gettop(L);
|
||||
if (getPointsFunction != LUA_REFNIL) {
|
||||
if (pcallFunc(L, getPointsFunction, 1)) {
|
||||
bool firstPts = (pts == nullptr);
|
||||
uint32_t h = getPts(L);
|
||||
if (h != ptsHash) {
|
||||
ptsHash = h;
|
||||
setLine();
|
||||
}
|
||||
if (firstPts) {
|
||||
setColor(color.flags);
|
||||
setOpacity(opacity.value);
|
||||
}
|
||||
lua_settop(L, t);
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user