mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix rendering of LRF files from TOR
This commit is contained in:
parent
18d9e00938
commit
fcc5866881
@ -108,6 +108,7 @@ class _Canvas(QGraphicsRectItem):
|
|||||||
line = block.peek()
|
line = block.peek()
|
||||||
y += block.bs.topskip
|
y += block.bs.topskip
|
||||||
block_consumed = False
|
block_consumed = False
|
||||||
|
line.height = min(line.height, self.max_y-y) # LRF files from TOR have Plot elements with their height set to 800
|
||||||
while y + line.height <= self.max_y:
|
while y + line.height <= self.max_y:
|
||||||
block.commit()
|
block.commit()
|
||||||
if isinstance(line, QGraphicsItem):
|
if isinstance(line, QGraphicsItem):
|
||||||
|
@ -450,7 +450,7 @@ class Line(QGraphicsItem):
|
|||||||
if self.current_link is not None:
|
if self.current_link is not None:
|
||||||
self.end_link()
|
self.end_link()
|
||||||
|
|
||||||
# We justify is line is small and it doesn't have links in it
|
# We justify if line is small and it doesn't have links in it
|
||||||
# If it has links, justification would cause the boundingrect of the link to
|
# If it has links, justification would cause the boundingrect of the link to
|
||||||
# be too small
|
# be too small
|
||||||
if self.current_width >= 0.85 * self.line_length and len(self.links) == 0:
|
if self.current_width >= 0.85 * self.line_length and len(self.links) == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user