Fix plugin-driven list view not invalidated on setting change (#26350)

* Fix: Plugin-driven list view not invalidated on setting changes

* fix: tweak list view invalidation conditions

* fix: WindowUpdateScrollWidgets needs reference, not pointer

* Add changelog entry

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
SunsetFiandTulio Leao authored and GitHub committed 2026-06-06 18:30:50 +00:00
1 parent 84211fdb56
commit c5a7f3091f
2 files changed
+6

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
0.5.2 (in development)
------------------------------------------------------------------------
- Improved: [#26566] Improve the performance of sorting sprites.
- Fix: [#26350] ListViews altered by plugins post their creation are not invalidated.
- Fix: [#26565] Game crashes when switching to another tab in the guest window.
- Fix: [#26583] The default tab is not highlighted when opening a ride window.
- Fix: [#26602] Crash when locating the nearest mechanic for a ride that has not previously been inspected.
+5
View File
@@ -873,6 +873,7 @@ namespace OpenRCT2::Scripting
if (listView != nullptr)
{
listView->CanSelect = valueBool;
Invalidate(thisVal);
}
return JS_UNDEFINED;
}
@@ -895,6 +896,7 @@ namespace OpenRCT2::Scripting
if (listView != nullptr)
{
listView->IsStriped = valueBool;
Invalidate(thisVal);
}
return JS_UNDEFINED;
}
@@ -938,6 +940,8 @@ namespace OpenRCT2::Scripting
if (listView != nullptr)
{
listView->ShowColumnHeaders = valueBool;
WindowUpdateScrollWidgets(*GetWindow(thisVal));
Invalidate(thisVal);
}
return JS_UNDEFINED;
}
@@ -968,6 +972,7 @@ namespace OpenRCT2::Scripting
if (listView != nullptr)
{
listView->SelectedCell = RowColumnFromJS(ctx, value);
Invalidate(thisVal);
}
return JS_UNDEFINED;
}