1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 21:19:10 +00:00

Fix #12202: Race condition when using sprite picker. (#12204)

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.
This commit is contained in:
2024-03-01 22:08:18 +00:00
committed by GitHub
parent 3fd5c33ae6
commit a602845d0a

View File

@@ -930,6 +930,9 @@ struct SpriteAlignerWindow : Window {
}
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);
int step_size = nwid->resize_y;