From 54237d7976c4dafbef18ef2df6cf3402e4301baf Mon Sep 17 00:00:00 2001 From: James Westman Date: Sat, 30 Oct 2021 20:33:41 -0500 Subject: [PATCH] Preserve child ordering in toplevel The order of elements sometimes matters, so don't sort children by type. --- gtkblueprinttool/ast.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtkblueprinttool/ast.py b/gtkblueprinttool/ast.py index c9a6ea5..ded3a2b 100644 --- a/gtkblueprinttool/ast.py +++ b/gtkblueprinttool/ast.py @@ -130,8 +130,7 @@ class UI(AstNode): def emit_xml(self, xml: XmlEmitter): xml.start_tag("interface") - self.gtk_directive.emit_xml(xml) - for x in [*self.templates, *self.objects, *self.menus]: + for x in self.child_nodes: x.emit_xml(xml) xml.end_tag()