Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve chance that XRC preview will find the artwork. #1555

Merged
merged 3 commits into from
Dec 24, 2024
Merged

Conversation

Randalphwa
Copy link
Collaborator

This PR sets the current working directory to the Art Directory (or Project file directory if Art Directory hasn't been specified) before previewing XRC files. The generated XML file has no way of knowing where the art files will be relative to the current directory of the app loading the XRC file. By setting the current working directory to the likely location of the art files, this should result in most art work being displayed when previewing XRC content.

Since XRC art files don't have full paths. setting the current directory to
any directory specified for Art may result in the files being loaded correctly.
In most cases the user will want to preview a specific dialog, so this displays
the possible dialogs first, letting the user then choose which one to view.
This shouldn't matter for C++ which will be using embedded art, but for
XRC it increases the chance that it will load the requested art (which
doesn't have a path specifier).
@Randalphwa Randalphwa merged commit 7bcffe8 into main Dec 24, 2024
2 checks passed
@Randalphwa Randalphwa deleted the xrc_view_cwd branch December 24, 2024 03:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant