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.
pull/663/head
Peter Nelson 2 months ago committed by GitHub
parent 3fd5c33ae6
commit a602845d0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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;

Loading…
Cancel
Save