correct initial img_count (#817)

fixes issue https://github.com/tzutalin/labelImg/issues/816
This commit is contained in:
HLiang 2021-11-19 23:43:57 -06:00 committed by GitHub
parent d4030a71af
commit 39ecb789a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ class MainWindow(QMainWindow, WindowMixin):
self.label_hist = [] self.label_hist = []
self.last_open_dir = None self.last_open_dir = None
self.cur_img_idx = 0 self.cur_img_idx = 0
self.img_count = 1 self.img_count = len(self.m_img_list)
# Whether we need to save or not. # Whether we need to save or not.
self.dirty = False self.dirty = False
@ -1348,7 +1348,7 @@ class MainWindow(QMainWindow, WindowMixin):
self.load_file(filename) self.load_file(filename)
def open_next_image(self, _value=False): 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.auto_saving.isChecked():
if self.default_save_dir is not None: if self.default_save_dir is not None:
if self.dirty is True: if self.dirty is True: