Fix rendering of LRF files from TOR

This commit is contained in:
Kovid Goyal 2008-08-27 18:02:39 -07:00
parent 18d9e00938
commit fcc5866881
2 changed files with 2 additions and 1 deletions

View File

@ -108,6 +108,7 @@ class _Canvas(QGraphicsRectItem):
line = block.peek()
y += block.bs.topskip
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:
block.commit()
if isinstance(line, QGraphicsItem):

View File

@ -450,7 +450,7 @@ class Line(QGraphicsItem):
if self.current_link is not None:
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
# be too small
if self.current_width >= 0.85 * self.line_length and len(self.links) == 0: