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 commented Jan 26, 2019

I think I handled all cases.

@glx22

This comment has been minimized.

Copy link
Contributor Author

glx22 commented Jan 27, 2019

I'm thinking about another solution with less closing.

@glx22 glx22 added the wip label Jan 27, 2019
@glx22

This comment has been minimized.

Copy link
Contributor Author

glx22 commented Jan 27, 2019

The other possible solution is c9bbbd2

@LordAro

This comment has been minimized.

Copy link
Member

LordAro commented Jan 27, 2019

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

@LordAro

This comment has been minimized.

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 glx22 force-pushed the glx22:fix7089 branch from 8302ce7 to 02fa174 Jan 28, 2019
@glx22

This comment has been minimized.

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 force-pushed the glx22:fix7089 branch from 02fa174 to c8efc1e Jan 29, 2019
@glx22 glx22 removed the wip label Jan 29, 2019
@LordAro LordAro merged commit bb9b8eb into OpenTTD:master Jan 31, 2019
1 check passed
1 check passed
OpenTTD CI Build #20190129.9 succeeded
Details
@glx22 glx22 deleted the glx22:fix7089 branch Feb 1, 2019
nielsmh added a commit to nielsmh/OpenTTD that referenced this pull request Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.