Edit book: Fix deleting a file that is currently open in an editor, not auto-closing the editor

This commit is contained in:
Kovid Goyal 2013-12-20 14:37:26 +05:30
parent e586ce4f41
commit 873ebee3ed
2 changed files with 2 additions and 1 deletions

View File

@ -257,7 +257,7 @@ class Boss(QObject):
c.remove_item(name)
self.set_modified()
self.gui.file_list.delete_done(spine_items, other_items)
for name in list(spine_items) + list(other_items):
for name in [x for x, remove in spine_items if remove] + list(other_items):
if name in editors:
self.close_editor(name)
if not editors:

View File

@ -549,6 +549,7 @@ class Preview(QWidget):
def clear(self):
self.view.clear()
self.current_name = None
@property
def is_visible(self):