mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PDF Output: Fix add ToC option not being used
PDF Output: Fix Table of Contents being added tot he end of the PDF even without the Add Table of Contents option being enabled. Fixes #1194836 [When convert to PDF, it always create TOC at the end](https://bugs.launchpad.net/calibre/+bug/1194836)
This commit is contained in:
parent
63d133ea5c
commit
f63f142618
@ -253,7 +253,7 @@ class PDFWriter(QObject):
|
|||||||
return self.loop.exit(1)
|
return self.loop.exit(1)
|
||||||
try:
|
try:
|
||||||
if not self.render_queue:
|
if not self.render_queue:
|
||||||
if self.toc is not None and len(self.toc) > 0 and not hasattr(self, 'rendered_inline_toc'):
|
if self.opts.pdf_add_toc and self.toc is not None and len(self.toc) > 0 and not hasattr(self, 'rendered_inline_toc'):
|
||||||
return self.render_inline_toc()
|
return self.render_inline_toc()
|
||||||
self.loop.exit()
|
self.loop.exit()
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user