BF: Restore some backwards-compatability to GUI#6792
Merged
Conversation
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.
When adding "pipe syntax" (the ability to specify a field as fixed, required, etc. by adding
|fix,|req, etc.) we switched from using lists to manage the data in GUI to using a dict. Two problems arising from this are:Dlg.addField. This is fine if you're supplying named arguments to this function, but adding an arg to the beginning breaks positional arguments. This PR fixes this by moving the optional paramlabelto the end - essentially shifting everything else forwards.labelwas not supplied, as is the case if previously supplying the labels via the first positional argument (which is nowkey), the labels were blank. To fix this, I've changed the default forlabeltoNoneand, if left as None, it will inherit the value ofkeywith any pipe syntax removed.Addresses (but doesn't fully fix, as the output is still a dict so we still need to document this better) #6790 and #6781