Fix #7089: close NewGRF textfile windows when their data are invalid #7106
Conversation
|
I'm thinking about another solution with less closing. |
|
The other possible solution is c9bbbd2 |
|
Regardless of solution, it should be extended to ScriptTextfileWindow, which uses similar behaviour (See #7088) |
|
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 :) |
|
Hmm maybe this window_number change should be on an higher level in the TextfileWindow hierarchy |
I think I handled all cases.