Fix some EditField hotkey conflicts#1383
Closed
ChrisJohnsen wants to merge 3 commits intoDFHack:masterfrom
Closed
Conversation
These UIs have hotkeys that conflict with the new EditField editing features, but the EditFields can are only occasionally focused. Add `disabled` fields to the conflicting hotkey labels so the player can tell that they are not available while the EditField is focused.
I'm not aware of any problems from this, but it looked wrong.
The new EditField implementation has a different internal structure. `ignore_keys` works as part of initialization, but changing it post-init no longer works. We have to reach "deeper" to change the effective `ignore_keys` field. Also, a remove a stray comma. It didn't cause problems, but it was semantically odd.
Contributor
Author
|
Should the changelog have separate entries for each of the fixes? Or maybe just one entry to cover everything once the other UIs mentioned in DFHack/dfhack#5226 are also addressed? "Restore (or show when unavailable) some UI hotkeys that were previously masked by new text-editing features." |
Contributor
Author
|
The consensus on Discord seems to be in favor of adopting new UI hotkeys to let the "conflicting keys" be used uniformly as editing keys. Closing this since that probably applies to these cases too. The CivBox change (f2987e2) can always be cherry picked later. |
myk002
added a commit
to myk002/scripts
that referenced
this pull request
Feb 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Other EditField conflicts will be posted in an issue, but these seemed small- and effective-enough to put into commits.
The encapsulation violation for the CivBox fix isn't exactly pleasant, but it would probably be much more invasive to get EditField to support post-init reconfiguration.