Skip to content
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

Fix image saving for nonexistent pictures location #2141

Merged

Conversation

blabber
Copy link
Collaborator

@blabber blabber commented Jan 6, 2024

Saving a map to image fails, if the storage location described by QStandardPaths::PicturesLocation does not exist. Use the fallbacks already defined in the code, if the image would be saved in a nonexistent location.

Alternative solutions:

  1. Make the location configurable in "Interface Options -> Map Image"
  2. Open a "Save as..." dialog every time a map is saved
  3. Create the location, if it does not exist (I'd prefer if no directories are created without my knowledge)

In my experience the home directory is a sane fallback, especially as the full path to the image is displayed after saving. But this might be considered a workaround until a better solution ist implemented. Failing to save the image without showing the user a reason is definitely annoying and unexpected.

Saving a map to image fails, if the storage location described by
QStandardPaths::PicturesLocation does not exist. Use the fallbacks
already defined in the code, if the image would be saved in a
nonexistent location.
Copy link
Contributor

@lmoureaux lmoureaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lmoureaux lmoureaux enabled auto-merge (rebase) January 7, 2024 02:10
@lmoureaux
Copy link
Contributor

Feel free to add yourself to AUTHORS 🎉

@lmoureaux lmoureaux merged commit b0026cf into longturn:master Jan 7, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants