Updates:
Summary: exception during incremental layout of empty document
Comment #8 on issue 241 by oresmus: exception during incremental layout of
empty document
http://code.google.com/p/pyglet/issues/detail?id=241
FYI, I found the diffs and log entries from svn rev 1872 (and related rev
1873) in
which Alex fixed the original issue reported here. These make it clear
that the issue he fixed was "correctly initializing a layout displaying an
empty
document", rather than "assigning empty text to an existing nonempty
document" (as
most of the later-reported bugs are trying to do). (Looking at the code,
this effect
of the change also looks plausible.) This confirms the idea that this issue
is indeed
fixed, and issue 471 is not a duplicate of it.
This also makes it clear that, judging from the issue that was actually
fixed, the
original summary "Document doesn't allow replacement of text" is no longer
accurate.
(Maybe that bug was Richard's intent to report, but if so, refer to issue
471 for
that, which is more related and still open.) So I will change this bug's
summary to
describe what was actually fixed by the code change which closed the bug.
FYI (since I'm not sure if they're still accessible from google code --
certainly not
easily), here are the relevant svn revs and log entries:
[running in an old pyglet-svn directory]
% svn diff -c 1872
Index: tests/text/EMPTY.py
===================================================================
--- tests/text/EMPTY.py (revision 1871)
+++ tests/text/EMPTY.py (revision 1872)
@@ -8,6 +8,8 @@
__docformat__ = 'restructuredtext'
__version__ = '$Id: STYLE.py 1754 2008-02-10 13:26:52Z Alex.Holkner $'
+__noninteractive = True
+
import unittest
from pyglet import app
Index: tests/plan.txt
===================================================================
--- tests/plan.txt (revision 1871)
+++ tests/plan.txt (revision 1872)
@@ -201,6 +201,7 @@
text
text.RUNLIST GENERIC
+ text.EMPTY GENERIC
text.PLAIN GENERIC
text.STYLE GENERIC
text.ELEMENT GENERIC
Index: pyglet/text/layout.py
===================================================================
--- pyglet/text/layout.py (revision 1871)
+++ pyglet/text/layout.py (revision 1872)
@@ -1110,7 +1110,6 @@
if line.paragraph_end:
y -= margin_bottom_iterator[line.start]
-
line_index = start
for line in lines[start:]:
if line.paragraph_begin:
@@ -1447,6 +1446,7 @@
font = self.document.get_font(0, dpi=self._dpi)
self.lines[0].ascent = font.ascent
self.lines[0].descent = font.descent
+ self.lines[0].paragraph_begin = self.lines[0].paragraph_end =
True
self.invalid_lines.invalidate(0, 1)
self._update_glyphs()
The next revision further changed tests/text/EMPTY.py; the relevant log
entries
for that file [from svn log tests/text/EMPTY.py] are
r1873 | Alex.Holkner | 2008-03-06 01:22:23 -0800 (Thu, 06 Mar 2008) | 3
lines
Make EMPTY test less interactive
------------------------------------------------------------------------
r1872 | Alex.Holkner | 2008-03-06 00:20:56 -0800 (Thu, 06 Mar 2008) | 3
lines
Issue 241: fix incremental layout of empty document.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "pyglet-issues" group.
To post to this group, send email to
pyglet...@googlegroups.com.
To unsubscribe from this group, send email to
pyglet-issue...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pyglet-issues?hl=en.