Skip to content

Commit

Permalink
reading order conversion should recurse all regions, #2
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Apr 7, 2021
1 parent 99e80c5 commit 6ffa87a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocrd_page_to_alto/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def convert_styles(self):
self.textstyle_mgr.to_xml(self.alto_styles)

def convert_reading_order(self):
index_order = [x.id for x in self.page_page.get_AllRegions(order='reading-order', depth=1)]
index_order = [x.id for x in self.page_page.get_AllRegions(order='reading-order', depth=0)]
for id_cur, id_next in zip(index_order[:-1], index_order[1:]):
self.alto_printspace.find('*[@ID="%s"]' % id_cur).set('IDNEXT', id_next)

Expand Down

0 comments on commit 6ffa87a

Please sign in to comment.