1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 05:29:11 +00:00

Fix #11643: Empty area at top of survey preview. (#11647)

Empty area at the top of some textfile windows due to calling
SetDisplayedPlane() after calling FinishInitNested(), and/or changing
the displayed plane and not calling ReInit() after.

This was previously hidden by CheckForMissingGlyphs() reinitialising
all windows anyway.
This commit is contained in:
2023-12-30 00:19:27 +00:00
committed by GitHub
parent b86182ab84
commit fd84f73323
2 changed files with 4 additions and 5 deletions

View File

@@ -85,7 +85,7 @@ struct GameManualTextfileWindow : public TextfileWindow {
if (this->filename == CHANGELOG_FILENAME) {
this->link_anchors.clear();
this->AfterLoadChangelog();
this->GetWidget<NWidgetStacked>(WID_TF_SEL_JUMPLIST)->SetDisplayedPlane(this->jumplist.empty() ? SZSP_HORIZONTAL : 0);
if (this->GetWidget<NWidgetStacked>(WID_TF_SEL_JUMPLIST)->SetDisplayedPlane(this->jumplist.empty() ? SZSP_HORIZONTAL : 0)) this->ReInit();
} else {
this->TextfileWindow::AfterLoadText();
}