Refine saved state handling

This commit is contained in:
2026-06-29 18:29:32 +08:00
parent 9d57117094
commit 060017b417
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -352,6 +352,8 @@ class MainWindow(QMainWindow):
allow_copy=allow_copy.isChecked(),
allow_modify=allow_modify.isChecked(),
)
self._remember_file(selected)
self._update_current_tab_title()
self.statusBar().showMessage("已保存加密 PDF", 3000)
except Exception as exc:
QMessageBox.critical(self, "保存失败", f"无法保存加密 PDF:\n{exc}")
@@ -369,6 +371,9 @@ class MainWindow(QMainWindow):
try:
self._flush_session_raster_objects()
self.document.save_as(selected)
self._remember_file(selected)
self._update_current_tab_title()
self._update_title()
self.statusBar().showMessage("已另存为无密码 PDF", 3000)
except Exception as exc:
QMessageBox.critical(self, "移除失败", f"无法移除密码:\n{exc}")