-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
wxGUI/animation: add export output animation file validation, before export file #839
wxGUI/animation: add export output animation file validation, before export file #839
Conversation
924db5c
to
adc82fe
Compare
@veroandreo does this fix address the issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the validation would work, wouldn't it be better to just check for the extension and if the extension is not there, just add it to the file path? That would be more inline with how other programs deal with that.
adc82fe
to
0e6b2d4
Compare
Yes, this is true, but in the default behavior, an error message dialog is showed when you press the export button and the export dialog is closed. It's a little annoying reopening the export dialog again. Yes, a good idea. I've already fixed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this works great. I can see it's based on relesebranch_7_8, could you rebase it to master please?
gui/wxpython/animation/dialogs.py
Outdated
GError(parent=self, message=_("Export file is missing.")) | ||
return False | ||
else: | ||
if file_postfix not in file_path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably use endswith(), I can imagine users naming their files with e.g. 'gif' in the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably use endswith(), I can imagine users naming their files with e.g. 'gif' in the name.
Yes of course.
cd663f8
to
42c04f5
Compare
However, this requires the creation of a new PR based on the master branch? |
Hm, not quite sure how this works on Github, I merged this for now to 78 and cherry-picked to master. |
Shall this be backported? |
See comment above, it's in both branches. |
To Reproduce
/tmp/test
(but without postfix '.gif')Error message:
Expected behavior:
Validate exported output animation file name/path.