Share segmentation info between renders of the same text.

This commit is contained in:
Tom Rothamel
2017-11-19 11:52:54 -05:00
parent 58508655c7
commit 0777826d8c
+5 -1
View File
@@ -547,7 +547,11 @@ class Layout(object):
#
# This takes information from the various styles that apply to the text,
# and so needs to be redone when the style of the text changes.
self.paragraphs = self.segment(text.tokens, style, renders, text)
if splits_from:
self.paragraphs = splits_from.paragraphs
else:
self.paragraphs = self.segment(text.tokens, style, renders, text)
first_indent = self.scale_int(style.first_indent)
rest_indent = self.scale_int(style.rest_indent)