mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 07:12:58 +02:00
Edit Book: Fix open OPF file not being refreshed when deleting items from the file browser. Fixes #1445634 [Wrong .opf syncing when deleting xptg template (and others?)](https://bugs.launchpad.net/calibre/+bug/1445634)
This commit is contained in:
parent
8e85a16e4c
commit
a3a7b20f07
1 changed files with 3 additions and 0 deletions
|
|
@ -360,6 +360,7 @@ def apply_container_update_to_gui(self, mark_as_modified=True):
|
|||
@in_thread_job
|
||||
def delete_requested(self, spine_items, other_items):
|
||||
self.add_savepoint(_('Before: Delete files'))
|
||||
self.commit_dirty_opf()
|
||||
c = current_container()
|
||||
c.remove_from_spine(spine_items)
|
||||
for name in other_items:
|
||||
|
|
@ -379,6 +380,8 @@ def delete_requested(self, spine_items, other_items):
|
|||
toc = find_existing_toc(current_container())
|
||||
if toc and toc in editors:
|
||||
editors[toc].replace_data(c.raw_data(toc))
|
||||
if c.opf_name in editors:
|
||||
editors[c.opf_name].replace_data(c.raw_data(c.opf_name))
|
||||
|
||||
def commit_dirty_opf(self):
|
||||
c = current_container()
|
||||
|
|
|
|||
Loading…
Reference in a new issue