From 3ec8f283cb69b40d3ed3ba0cfae74fd47005f147 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 1 Oct 2017 12:21:23 +0200 Subject: [PATCH] core (xmlui): container now keep a list of children --- src/tools/xml_tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/xml_tools.py b/src/tools/xml_tools.py index 30527a2e..abe9834d 100644 --- a/src/tools/xml_tools.py +++ b/src/tools/xml_tools.py @@ -412,6 +412,7 @@ class Element(object): @parent: parent element """ assert self.type is not None + self.children = [] if not hasattr(self, 'elem'): self.elem = parent.xmlui.doc.createElement(self.type) self.xmlui = xmlui @@ -427,6 +428,7 @@ class Element(object): """ self.elem.appendChild(child.elem) child.parent = self + self.children.append(child) return child