Cancel export if esc used
This commit is contained in:
parent
1856d42ab4
commit
588d301f13
|
@ -724,8 +724,12 @@ class KISStopmo(tk.Tk):
|
||||||
|
|
||||||
def trigger_export_animation(self, event):
|
def trigger_export_animation(self, event):
|
||||||
# ~ output_folder = filedialog.askdirectory()
|
# ~ output_folder = filedialog.askdirectory()
|
||||||
# ~ self.export_filename = "{folder}{sep}{filename}".format(folder=output_folder, sep=os.sep, filename=self.output_filename)
|
# TODO : Check what happens when closing the window without entering a name
|
||||||
|
self.export_filename = ()
|
||||||
self.export_filename = filedialog.asksaveasfilename(defaultextension='.mp4', filetypes=((_("Mp4 files"), '*.mp4'),))
|
self.export_filename = filedialog.asksaveasfilename(defaultextension='.mp4', filetypes=((_("Mp4 files"), '*.mp4'),))
|
||||||
|
if not self.export_filename:
|
||||||
|
# ~ self.export_filename = "{folder}{sep}{filename}".format(folder=os.getcwd(), sep=os.sep, filename=self.output_filename)
|
||||||
|
return False
|
||||||
print(_("Exporting to {}").format(self.export_filename))
|
print(_("Exporting to {}").format(self.export_filename))
|
||||||
self.export_task = asyncio.run(self.export_animation())
|
self.export_task = asyncio.run(self.export_animation())
|
||||||
# check with self.export_task.done() == True ? https://stackoverflow.com/questions/69350645/proper-way-to-retrieve-the-result-of-tasks-in-asyncio
|
# check with self.export_task.done() == True ? https://stackoverflow.com/questions/69350645/proper-way-to-retrieve-the-result-of-tasks-in-asyncio
|
||||||
|
|
Loading…
Reference in New Issue