From 2319ce59fbf09963338700672b8acf0e0669bd3e Mon Sep 17 00:00:00 2001 From: Goffi Date: Tue, 25 Aug 2015 15:39:16 +0200 Subject: [PATCH] core (xmlui): reverted change from 039d96e131be: we should be able to recreate the same container with changeContainer --- src/tools/xml_tools.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/tools/xml_tools.py b/src/tools/xml_tools.py index b142c4b8..9de0c391 100644 --- a/src/tools/xml_tools.py +++ b/src/tools/xml_tools.py @@ -365,7 +365,7 @@ class Element(object): def append(self, child): """Append a child to this element. - + @param child (Element): child element @return: the added child Element """ @@ -571,7 +571,7 @@ class TabsContainer(Container): @param name (unicode): tab name @param label (unicode): tab label @param selected (bool): set to True to select this tab - @param container (class): container class, inheriting from Container + @param container (class): container class, inheriting from Container @return: the container for the new tab """ if not label: @@ -1172,8 +1172,7 @@ class XMLUI(object): @param container: either container type (container it then created), or an Container instance""" if isinstance(container, basestring): - if not isinstance(self.current_container, self._containers[container]): - self.current_container = self._createContainer(container, self.current_container.getParentContainer() or self.main_container, **kwargs) + self.current_container = self._createContainer(container, self.current_container.getParentContainer() or self.main_container, **kwargs) else: self.current_container = self.main_container if container is None else container assert isinstance(self.current_container, Container)