Improve handling of wxWidgets Project version #1325
Merged
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.
This removes the 3.1 default setting making it possible to set the value without having Preferences override it.
This PR changes how the wxWidgets version is set. It removes the default "3.1" setting so that it can be overridden with a specific setting. If it's not set, and the UI is loaded, it will default to the User's preference (defaults to 3.2). The exception to this is Imported projects -- since all other designers (as of 12/2023) are generating 3.1 code, the default is set to 3.1 for imported projects.
Note that this has no effect on wxPython or wxRuby code generation, since they are both built on top of wxWidgets 3.2.
This second part of the PR adds a Project.is_wxWidgets31() which can replace
Project.as_string(prop_wxWidgets_version) == "3.1"
to make the code more readable.