mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Sort <colors> as they are written to plots.xml
This commit is contained in:
parent
5a116aedb3
commit
033197a091
1 changed files with 2 additions and 1 deletions
|
|
@ -636,7 +636,8 @@ class Plot(object):
|
|||
subelement.text = ' '.join(str(x) for x in color)
|
||||
|
||||
if self._colors:
|
||||
for domain, color in self._colors.items():
|
||||
for domain, color in sorted(self._colors.items(),
|
||||
key=lambda x: x[0].id):
|
||||
subelement = ET.SubElement(element, "color")
|
||||
subelement.set("id", str(domain.id))
|
||||
if isinstance(color, string_types):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue