Merge pull request #422 from anthrotype/vdmx-sort

[V_D_M_X_] sort records by yPelHeight when writing toXML
This commit is contained in:
Cosimo Lupo 2015-12-07 11:15:10 +00:00
commit bc690a565d

View File

@ -176,10 +176,10 @@ class table_V_D_M_X_(DefaultTable.DefaultTable):
writer.comment("recs=%d, startsz=%d, endsz=%d" % writer.comment("recs=%d, startsz=%d, endsz=%d" %
(recs, startsz, endsz)) (recs, startsz, endsz))
writer.newline() writer.newline()
for yPelHeight in group.keys(): for yPelHeight, (yMax, yMin) in sorted(group.items()):
yMax, yMin = group[yPelHeight]
writer.simpletag( writer.simpletag(
"record", yPelHeight=yPelHeight, yMax=yMax, yMin=yMin) "record",
[('yPelHeight', yPelHeight), ('yMax', yMax), ('yMin', yMin)])
writer.newline() writer.newline()
writer.endtag("group") writer.endtag("group")
writer.newline() writer.newline()