Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7089: close NewGRF textfile windows when their data are invalid #7106

Merged
merged 1 commit into from Jan 31, 2019

Conversation

glx22
Copy link
Contributor

@glx22 glx22 commented Jan 26, 2019

I think I handled all cases.

@glx22
Copy link
Contributor Author

glx22 commented Jan 27, 2019

I'm thinking about another solution with less closing.

@glx22 glx22 added the wip Work in progress. Feature branch that will require feedback during the development process label Jan 27, 2019
@glx22
Copy link
Contributor Author

glx22 commented Jan 27, 2019

The other possible solution is c9bbbd2

@LordAro
Copy link
Member

LordAro commented Jan 27, 2019

Regardless of solution, it should be extended to ScriptTextfileWindow, which uses similar behaviour (See #7088)

@LordAro
Copy link
Member

LordAro commented Jan 27, 2019

Both GRF & Script textfile windows get given pointers that have their data change underneath them, and I suspect that changing it so that the windows maintain their own state a bit more is going to be a fair bit more work

Personally, I'd like it so that the Window properly refers to a particular AI/GRF/GS, and doesn't change/care when the underlying slot is updated. As such I'd definitely prefer option 1 over option 2 as currently presented, anyway :)

@glx22
Copy link
Contributor Author

glx22 commented Jan 28, 2019

Hmm maybe this window_number change should be on an higher level in the TextfileWindow hierarchy

@glx22 glx22 removed the wip Work in progress. Feature branch that will require feedback during the development process label Jan 29, 2019
@LordAro LordAro merged commit bb9b8eb into OpenTTD:master Jan 31, 2019
@glx22 glx22 deleted the fix7089 branch February 1, 2019 00:00
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this pull request Mar 11, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants