Edit book: Fix error when renaming the html file currently displayed in the preview panel and that file is not the file being currently edited

This commit is contained in:
Kovid Goyal 2013-12-18 22:36:11 +05:30
parent 0cf4238d5e
commit 9b60f3cae6

View File

@ -373,6 +373,8 @@ class Boss(QObject):
if oldname in editors:
editors[newname] = editors.pop(oldname)
self.gui.central.rename_editor(editors[newname], newname)
if self.gui.preview.current_name == oldname:
self.gui.preview.current_name = newname
self.apply_container_update_to_gui()
# }}}