fix save bugs
This commit is contained in:
parent
3c5e85df23
commit
d3cc092f36
@ -44,7 +44,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.current_index = None
|
self.current_index = None
|
||||||
self.current_file_index: int = None
|
self.current_file_index: int = None
|
||||||
|
|
||||||
self.current_label = '__background__'
|
self.current_cat = '__background__'
|
||||||
self.current_group = 1
|
self.current_group = 1
|
||||||
|
|
||||||
self.config_file = CONFIG_FILE if os.path.exists(CONFIG_FILE) else DEFAULT_CONFIG_FILE
|
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):
|
def show_image(self, index:int):
|
||||||
self.reset_action()
|
self.reset_action()
|
||||||
self.current_label = None
|
|
||||||
self.load_finished = False
|
self.load_finished = False
|
||||||
self.saved = True
|
self.saved = True
|
||||||
if not -1 < index < len(self.files_list):
|
if not -1 < index < len(self.files_list):
|
||||||
@ -368,8 +367,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
self.actionFinish.setEnabled(True)
|
self.actionFinish.setEnabled(True)
|
||||||
self.actionCancel.setEnabled(True)
|
self.actionCancel.setEnabled(True)
|
||||||
self.actionVisible.setEnabled(True)
|
self.actionVisible.setEnabled(True)
|
||||||
|
self.load_finished = True
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
self.current_label = None
|
||||||
|
|
||||||
self.scene.cancel_draw()
|
self.scene.cancel_draw()
|
||||||
|
|
||||||
self.polygons.clear()
|
self.polygons.clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user