mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
Fix a4dc7249ee: Changing language or interface scale could hang. (#14087)
A bit of hysteresis caused by OnResize calling ReInit calling OnResize calling ReInit calling OnResize calling ReInit ...
This commit is contained in:
@@ -2001,9 +2001,9 @@ struct MainToolbarWindow : Window {
|
||||
DoZoomInOutWindow(ZOOM_NONE, this);
|
||||
}
|
||||
|
||||
void FindWindowPlacementAndResize([[maybe_unused]] int def_width, [[maybe_unused]] int def_height) override
|
||||
void FindWindowPlacementAndResize(int, int def_height, bool allow_resize) override
|
||||
{
|
||||
Window::FindWindowPlacementAndResize(_toolbar_width, def_height);
|
||||
Window::FindWindowPlacementAndResize(_toolbar_width, def_height, allow_resize);
|
||||
}
|
||||
|
||||
void OnPaint() override
|
||||
@@ -2340,9 +2340,9 @@ struct ScenarioEditorToolbarWindow : Window {
|
||||
DoZoomInOutWindow(ZOOM_NONE, this);
|
||||
}
|
||||
|
||||
void FindWindowPlacementAndResize([[maybe_unused]] int def_width, [[maybe_unused]] int def_height) override
|
||||
void FindWindowPlacementAndResize(int, int def_height, bool allow_resize) override
|
||||
{
|
||||
Window::FindWindowPlacementAndResize(_toolbar_width, def_height);
|
||||
Window::FindWindowPlacementAndResize(_toolbar_width, def_height, allow_resize);
|
||||
}
|
||||
|
||||
void OnPaint() override
|
||||
|
||||
Reference in New Issue
Block a user