Skip to content

Commit

Permalink
Add defaultextension to save dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Jun 20, 2023
1 parent 2de4ab4 commit 71eebf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roop/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def select_output_path(start: Callable[[], None]) -> None:
global RECENT_DIRECTORY_OUTPUT

if is_image(roop.globals.target_path):
output_path = ctk.filedialog.asksaveasfilename(title='save image output file', initialfile='output.png', initialdir=RECENT_DIRECTORY_OUTPUT)
output_path = ctk.filedialog.asksaveasfilename(title='save image output file', defaultextension='.png', initialfile='output.png', initialdir=RECENT_DIRECTORY_OUTPUT)
elif is_video(roop.globals.target_path):
output_path = ctk.filedialog.asksaveasfilename(title='save video output file', initialfile='output.mp4', initialdir=RECENT_DIRECTORY_OUTPUT)
output_path = ctk.filedialog.asksaveasfilename(title='save video output file', defaultextension='.mp4', initialfile='output.mp4', initialdir=RECENT_DIRECTORY_OUTPUT)
else:
output_path = None
if output_path:
Expand Down

0 comments on commit 71eebf3

Please sign in to comment.