1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 01:42:38 +01:00

Fix: Closing the Game Options window closes all textfile windows.

Record the parent window that opens a textfile window so only child windows are closed instead of all.
This commit is contained in:
Peter Nelson
2025-05-04 17:50:31 +01:00
committed by Peter Nelson
parent dabf2ede67
commit ac76212b80
12 changed files with 44 additions and 45 deletions

View File

@@ -83,10 +83,11 @@ static WindowDesc _textfile_desc(
_nested_textfile_widgets
);
TextfileWindow::TextfileWindow(TextfileType file_type) : Window(_textfile_desc), file_type(file_type)
TextfileWindow::TextfileWindow(Window *parent, TextfileType file_type) : Window(_textfile_desc), file_type(file_type)
{
/* Init of nested tree is deferred.
* TextfileWindow::ConstructWindow must be called by the inheriting window. */
this->parent = parent;
}
void TextfileWindow::ConstructWindow()