core (xmlui): reverted change from 039d96e131be: we should be able to recreate the same container with changeContainer

This commit is contained in:
Goffi 2015-08-25 15:39:16 +02:00
commit 2319ce59fb

View file

@ -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)