From 39ecb789a7476bd25ef9bb7f41cde3c03f7b5244 Mon Sep 17 00:00:00 2001 From: HLiang Date: Fri, 19 Nov 2021 23:43:57 -0600 Subject: [PATCH] correct initial img_count (#817) fixes issue https://github.com/tzutalin/labelImg/issues/816 --- labelImg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/labelImg.py b/labelImg.py index cc9edd9c..eca22e72 100755 --- a/labelImg.py +++ b/labelImg.py @@ -101,7 +101,7 @@ class MainWindow(QMainWindow, WindowMixin): self.label_hist = [] self.last_open_dir = None self.cur_img_idx = 0 - self.img_count = 1 + self.img_count = len(self.m_img_list) # Whether we need to save or not. self.dirty = False @@ -1348,7 +1348,7 @@ class MainWindow(QMainWindow, WindowMixin): self.load_file(filename) def open_next_image(self, _value=False): - # Proceeding prev image without dialog if having any label + # Proceeding next image without dialog if having any label if self.auto_saving.isChecked(): if self.default_save_dir is not None: if self.dirty is True: