Skip to content

Commit

Permalink
Revert "add new option for auto save unsaved changes (#76)"
Browse files Browse the repository at this point in the history
This reverts commit d864230.
  • Loading branch information
GreatV authored Sep 24, 2024
1 parent 476b4db commit 992f4a6
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 189 deletions.
17 changes: 0 additions & 17 deletions PPOCRLabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,16 +1058,6 @@ def getStr(strId):
self.displayIndexOption.setChecked(settings.get(SETTING_PAINT_INDEX, False))
self.autoReRecognitionOption.triggered.connect(self.autoSaveFunc)

self.autoSaveUnsavedChangesOption = QAction(
getStr("autoSaveUnsavedChanges"), self
)
self.autoSaveUnsavedChangesOption.setCheckable(True)
self.autoSaveUnsavedChangesOption.setChecked(
settings.get(SETTING_PAINT_LABEL, False)
)
self.displayIndexOption.setChecked(settings.get(SETTING_PAINT_INDEX, False))
self.autoSaveUnsavedChangesOption.triggered.connect(self.autoSaveFunc)

addActions(
self.menus.file,
(
Expand All @@ -1079,7 +1069,6 @@ def getStr(strId):
exportJSON,
self.autoSaveOption,
self.autoReRecognitionOption,
self.autoSaveUnsavedChangesOption,
None,
resetAll,
deleteImg,
Expand Down Expand Up @@ -2602,12 +2591,6 @@ def mayContinue(self): #
if not self.dirty:
return True
else:
if self.autoSaveUnsavedChangesOption.isChecked():
self.canvas.isInTheSameImage = True
self.saveFile()
self.canvas.isInTheSameImage = False
return True

discardChanges = self.discardChangesDialog()
if discardChanges == QMessageBox.No:
return True
Expand Down
Loading

0 comments on commit 992f4a6

Please sign in to comment.