changeset 1490:55cff13b1f10

core (xmlui): reverted change from 039d96e131be: we should be able to recreate the same container with changeContainer
author Goffi <goffi@goffi.org>
date Tue, 25 Aug 2015 15:39:16 +0200
parents 039d96e131be
children 704ca56f5ca9
files src/tools/xml_tools.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/xml_tools.py	Tue Aug 25 14:41:42 2015 +0200
+++ b/src/tools/xml_tools.py	Tue Aug 25 15:39:16 2015 +0200
@@ -365,7 +365,7 @@
 
     def append(self, child):
         """Append a child to this element.
-        
+
         @param child (Element): child element
         @return: the added child Element
         """
@@ -571,7 +571,7 @@
         @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 @@
         @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)