Open GoogleCodeExporter opened 9 years ago
I found another problem concerning insert_element: it raises an attribute
exception when 2 elements are inserted one after another (without using
insert_text in between)
It is possible to replicate the issue by commenting the row 28 in the attached
file imageTest4.py.
Traceback (most recent call last):
File "./imageTest4.py", line 63, in <module>
pyglet.app.run()
File "/usr/local/lib/python2.7/dist-packages/pyglet/app/__init__.py", line 264, in run
EventLoop().run()
File "/usr/local/lib/python2.7/dist-packages/pyglet/app/xlib.py", line 82, in run
window.dispatch_platform_event(e)
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/xlib/__init__.py", line 1169, in dispatch_platform_event
event_handler(e)
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/xlib/__init__.py", line 1333, in _event_key
self.dispatch_event('on_key_press', symbol, modifiers)
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/__init__.py", line 1219, in dispatch_event
EventDispatcher.dispatch_event(self, *args)
File "/usr/local/lib/python2.7/dist-packages/pyglet/event.py", line 340, in dispatch_event
if handler(*args):
File "./imageTest4.py", line 31, in on_key_press
layout.end_update()
File "/usr/local/lib/python2.7/dist-packages/pyglet/text/layout.py", line 807, in end_update
self._update()
File "/usr/local/lib/python2.7/dist-packages/pyglet/text/layout.py", line 1838, in _update
self._update_flow_glyphs()
File "/usr/local/lib/python2.7/dist-packages/pyglet/text/layout.py", line 1929, in _update_flow_glyphs
invalid_start, len(self._document.text)):
File "/usr/local/lib/python2.7/dist-packages/pyglet/text/layout.py", line 1020, in _flow_glyphs
for line in self._flow_glyphs_wrap(glyphs, owner_runs, start, end):
File "/usr/local/lib/python2.7/dist-packages/pyglet/text/layout.py", line 1216, in _flow_glyphs_wrap
k, g = run_accum[0].glyphs[0]
AttributeError: '_InlineElementBox' object has no attribute 'glyphs'
Original comment by ha...@centrum.cz
on 7 Mar 2013 at 6:56
Original issue reported on code.google.com by
ha...@centrum.cz
on 7 Mar 2013 at 4:48Attachments: