fix crash in list layout caused by rendering all previous hidden entries.

This commit is contained in:
ITotalJustice
2025-05-14 18:00:56 +01:00
parent 3bbb5ccb3c
commit 5a53947a3e

View File

@@ -244,6 +244,11 @@ void List::DrawHome(NVGcontext* vg, Theme* theme, s64 count, Callback callback)
nvgIntersectScissor(vg, GetX(), GetY(), GetW(), GetH()); nvgIntersectScissor(vg, GetX(), GetY(), GetW(), GetH());
for (s64 i = 0; i < count; i++, v.x += v.w + m_pad.x) { for (s64 i = 0; i < count; i++, v.x += v.w + m_pad.x) {
// skip anything not visible
if (v.x + v.w < GetX()) {
continue;
}
if (v.x > GetX() + GetW()) { if (v.x > GetX() + GetW()) {
break; break;
} }