-
-
Notifications
You must be signed in to change notification settings - Fork 531
[#960 & #1956] Add OK/Cancel button to component config & fix weird multi-comp edit bug #1957
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
Conversation
At least I hope this fixes it; it was a weird bug and hard to replicate...
# Conflicts: # core/resources/l10n/messages.properties
# Conflicts: # core/resources/l10n/messages.properties
|
By the way, I'm sorry that I'm not abiding to the feature-frozen rule, but I really wanted to get this in before the final release. |
|
This will be a nice addition. . . eliminating one of my minor pet peeves. Functions as expected; no anomalies found. Build 1416 |
|
One little thing -- I like that if I click "Cancel" I get a confirmation dialog that asks if I really want to delete my changes. But if I answer "No" it closes the configuration dialog. To me, the expected behavior at that point would be to revert my changes, but leave the configuration dialog open. |
Fixed now. |
|
Seeing another problem -- Open a design, edit the sustainer (I'm not seeing it with other components, but I haven't tested exhaustively). Change a parameter, click "Cancel", click "Yes". I get |
Hm, good catch! It's exclusive to stages and boosters, because after the undo-action, the stage's and booster's parent is set to null (because the reference changes after a loadFromRocket or something). |
|
Okay, should be fixed, thanks again @JoePfeiffer. |
This PR fixes #960 by adding an OK and Cancel button to the component config dialog. I know that in PR #960 @neilweinstock expressed the desire for an alternative nomenclature, but I still want to stick with the "OK" and "Cancel" buttons simply because the texts are so dissimilar and short. If we were for instance to use "Cancel" and "Close", it would be easy for a user to misread e.g. "Cancel" for "Close". Or if you name it "Revert" and "Close", those are longer to read than simply "OK" and "Cancel".
Now in an attempt to still please Neil, I added a modification indicator to the component config. The config title will now show an asterisk symbol (*) when the component is modified.
Demo:
Screen.Recording.2023-01-08.at.04.36.47.mp4
As you can see, the previous "Close" button is now replaced by "OK", and there is a "Cancel" button. Clicking the "Cancel" button will launch a yes/no option pane to ask if you really want to discard your changes (or undo a component addition). You can opt to not show that dialog again.
Some things to note:
Additional Note: if you enable the "Don't ask again" checkbox, there is no way to bring it back other than going to the preference panel and resetting all preferences. I didn't want to add an extra checkbox in the preferences panel to enable/disable the "Don't ask again" setting (similar to the "Show warning when saving in RockSim format) as to not clutter the preference dialog. If you think such an option is still useful, I can add it.
While working on this PR, I came across the very fun bug #1956. Since I initially thought I messed up the PR, I was already working on a fix. So this PR also fixes #1956, instead of it being in a separate PR.