This commit is contained in:
Kovid Goyal 2014-06-25 09:38:17 +05:30
parent a8ba2c3bfd
commit 4f13036757

View File

@ -407,6 +407,9 @@ class Boss(QObject):
self.set_modified() self.set_modified()
def edit_toc(self): def edit_toc(self):
if current_container() is None:
return error_dialog(self.gui, _('No book opened'), _(
'You must open a book before trying to edit the Table of Contents.'), show=True)
self.add_savepoint(_('Before: Edit Table of Contents')) self.add_savepoint(_('Before: Edit Table of Contents'))
d = TOCEditor(title=self.current_metadata.title, parent=self.gui) d = TOCEditor(title=self.current_metadata.title, parent=self.gui)
if d.exec_() != d.Accepted: if d.exec_() != d.Accepted: