Handle open dialog canceled
This commit is contained in:
parent
da90d86bbd
commit
ba7e2a5328
|
@ -60,7 +60,10 @@ class ImageView(tk.Frame):
|
||||||
self.caption_frame.pack(fill=tk.Y, side=tk.RIGHT)
|
self.caption_frame.pack(fill=tk.Y, side=tk.RIGHT)
|
||||||
|
|
||||||
def open_folder(self):
|
def open_folder(self):
|
||||||
self.base_path = Path(filedialog.askdirectory())
|
dir = filedialog.askdirectory()
|
||||||
|
if not dir:
|
||||||
|
return
|
||||||
|
self.base_path = Path(dir)
|
||||||
if self.base_path is None:
|
if self.base_path is None:
|
||||||
return
|
return
|
||||||
self.images.clear()
|
self.images.clear()
|
||||||
|
|
Loading…
Reference in New Issue