1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 17:39:09 +00:00

Fix #11966: Scrollbar may be incorrect on first opening of text file window. (#11981)

The scrollbar is set up before the true monospace is loaded, so reinitialise the window after loading.
This commit is contained in:
2024-02-04 10:15:20 +00:00
committed by GitHub
parent 75015cdad2
commit 83d63464db

View File

@@ -850,6 +850,9 @@ void TextfileWindow::LoadText(std::string_view buf)
this->AfterLoadText();
CheckForMissingGlyphs(true, this);
/* The font may have changed when searching for glyphs, so ensure widget sizes are updated just in case. */
this->ReInit();
}
/**