Edit book: Fix error when merging html files that include a currently opened file and a non-html file is also open

This commit is contained in:
Kovid Goyal 2014-01-07 13:35:18 +05:30
parent a8a81594f4
commit 305379f27f

View File

@ -1065,7 +1065,7 @@ class Boss(QObject):
editor = editors.pop(name)
self.gui.central.close_editor(editor)
editor.break_cycles()
if not editors:
if not editors or getattr(self.gui.central.current_editor, 'syntax', None) != 'html':
self.gui.preview.clear()
def insert_character(self):