1
0
Fork 0

Fix #12202: Race condition when use sprite picker.

When using the sprite picker the screen is redrawn so that the sprites under the mouse cursor can be captured. This redraw also caused the sprite aligner window to be redrawn before the OnInvalidateData event that updates its scrollbars with the list count.
pull/12204/head
Peter Nelson 2024-03-01 21:26:51 +00:00
parent 890040ceea
commit f6f4ff58c7
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 3 additions and 0 deletions

View File

@ -930,6 +930,9 @@ struct SpriteAlignerWindow : Window {
} }
case WID_SA_LIST: { case WID_SA_LIST: {
/* Don't redraw sprite list while it is still being filled by picker. */
if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW) break;
const NWidgetBase *nwid = this->GetWidget<NWidgetBase>(widget); const NWidgetBase *nwid = this->GetWidget<NWidgetBase>(widget);
int step_size = nwid->resize_y; int step_size = nwid->resize_y;