Fix index out of range when deleting the final image

This commit is contained in:
Michael Stevenson 2022-11-28 09:37:08 -08:00
parent ba7e2a5328
commit 53809e3b3f
1 changed files with 1 additions and 1 deletions

View File

@ -106,8 +106,8 @@ class ImageView(tk.Frame):
caption_path = img.caption_path()
if caption_path.exists():
caption_path.rename(trash_path / caption_path.name)
del self.images[self.index]
self.set_index(self.index)
self.update_ui()
def update_ui(self):