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:
Peter Nelson 2024-02-04 10:15:20 +00:00 committed by GitHub
parent 75015cdad2
commit 83d63464db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

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();
}
/**