mirror of https://github.com/OpenTTD/OpenTTD
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
parent
890040ceea
commit
f6f4ff58c7
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue