fix(color): Lua LVGL line color not set correctly when 'pts' property is a function (#6270)

This commit is contained in:
philmoz
2025-05-18 08:36:26 +10:00
committed by GitHub
parent b4e5ba7a8d
commit 08b2b1a63a
+5
View File
@@ -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;