-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
Change: Disable NewGRF window apply button if no change was made #8934
Conversation
The NewGRF window is (along with a lot of the other new game menus) is going to be rewritten for 1.12, so I'm tempted to close this as it's not a change that will ever see a release... (happy for other opinions) |
Good to know, is there a wiki or documentation about the plans? I don't want to work on things that will be re-written :) |
01a01ae
to
f6946e5
Compare
Thanks @michicc for the comments, I just made simplifications and looks pretty cleaner now. |
Found a missed variant: Moving a NewGRF in the active list up or down does not enable the apply button. |
Wohaa! Good catch! I can't believe I missed that, well that's awesome, let me fix that and force push the new code. |
Motivation / Problem
The NewGRF window has a 'Apply changes' button that's always enabled, even if the user has not made any change to the NewGRF. In addition, closing the NewGRF window without having made any change executes the reload of NewGRF which can take some time.
Description
This change makes the 'Apply changes' button to be disabled (grayed out) by default until changes are made, including loading a preset, dragging/dropping from/to the inactive NewGRFs list, clicking on the 'Add' or 'Remove' button, toggling the palette, and opening the parameters window. I believe with this all changes are covered. I have also verified with the scenario editor, where NewGRFs cannot be modified by default unless the hidden developer option is changed in the configuration file.
Limitations
None I can think of.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.