Compare commits

..

1 Commits

Author SHA1 Message Date
copper
d3cc092f36 fix save bugs 2023-09-13 16:18:36 +08:00

View File

@ -44,7 +44,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self.current_index = None
self.current_file_index: int = None
self.current_label = '__background__'
self.current_cat = '__background__'
self.current_group = 1
self.config_file = CONFIG_FILE if os.path.exists(CONFIG_FILE) else DEFAULT_CONFIG_FILE
@ -351,7 +351,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
def show_image(self, index:int):
self.reset_action()
self.current_label = None
self.load_finished = False
self.saved = True
if not -1 < index < len(self.files_list):
@ -368,8 +367,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self.actionFinish.setEnabled(True)
self.actionCancel.setEnabled(True)
self.actionVisible.setEnabled(True)
self.load_finished = True
return
try:
self.current_label = None
self.scene.cancel_draw()
self.polygons.clear()