mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Save the state of the current book when opening a new book via File->Open book
This commit is contained in:
parent
988515665f
commit
0c231f4c1c
@ -350,6 +350,8 @@ class Boss(QObject):
|
|||||||
if self.file_was_readonly:
|
if self.file_was_readonly:
|
||||||
warning_dialog(self.gui, _('Read-only file'), _(
|
warning_dialog(self.gui, _('Read-only file'), _(
|
||||||
'The file {} is read-only. Saving changes to it will either fail or cause its permissions to be reset.').format(path), show=True)
|
'The file {} is read-only. Saving changes to it will either fail or cause its permissions to be reset.').format(path), show=True)
|
||||||
|
with self.editor_cache:
|
||||||
|
self.save_book_edit_state()
|
||||||
|
|
||||||
for name in tuple(editors):
|
for name in tuple(editors):
|
||||||
self.close_editor(name)
|
self.close_editor(name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user