diff --git a/src/window.cpp b/src/window.cpp index 38f60e74ea..a70c78f884 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3026,14 +3026,6 @@ void InputLoop() /* Process scheduled window deletion. */ Window::DeleteClosedWindows(); - /* Handle sprite picker before any GUI interaction */ - if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW) { - /* We are done with the last draw-frame, so we know what sprites we - * clicked on. Reset the picker mode and invalidate the window. */ - _newgrf_debug_sprite_picker.mode = SPM_NONE; - InvalidateWindowData(WC_SPRITE_ALIGNER, 0, 1); - } - /* HandleMouseEvents was already called for this tick */ HandleMouseEvents(); } @@ -3117,6 +3109,13 @@ void UpdateWindows() NetworkDrawChatMessage(); /* Redraw mouse cursor in case it was hidden */ DrawMouseCursor(); + + if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW) { + /* We are done with the last draw-frame, so we know what sprites we + * clicked on. Reset the picker mode and invalidate the window. */ + _newgrf_debug_sprite_picker.mode = SPM_NONE; + InvalidateWindowData(WC_SPRITE_ALIGNER, 0, 1); + } } /**