From 305379f27f208f6d470104b4ec0655c52d7df1a5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 7 Jan 2014 13:35:18 +0530 Subject: [PATCH] Edit book: Fix error when merging html files that include a currently opened file and a non-html file is also open --- src/calibre/gui2/tweak_book/boss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index cabc3e8eb0..fd04f3cb62 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -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):