Edit Book: Fix TOC editor window not remembering its last used size

This commit is contained in:
Kovid Goyal 2015-05-05 11:46:33 +05:30
parent 2e893908e3
commit c1cd424099

View File

@ -64,6 +64,7 @@ class TOCEditor(QDialog):
self.stacks.setCurrentIndex(0)
elif self.stacks.currentIndex() == 0:
self.write_toc()
tprefs['toc_editor_window_geom'] = bytearray(self.saveGeometry())
super(TOCEditor, self).accept()
def really_accept(self, tb):
@ -72,7 +73,6 @@ class TOCEditor(QDialog):
error_dialog(self, _('Failed to write book'),
_('Could not write %s. Click "Show details" for'
' more information.')%self.book_title, det_msg=tb, show=True)
tprefs['toc_editor_window_geom'] = bytearray(self.saveGeometry())
super(TOCEditor, self).reject()
return