tools, frontends (xmlui): allow to select a tab when adding it

This commit is contained in:
souliane 2015-08-21 14:17:41 +02:00
commit a90bcacfe9

View file

@ -374,12 +374,13 @@ class XMLUIPanel(XMLUIBase):
elif node.nodeName == 'tab':
name = node.getAttribute('name')
label = node.getAttribute('label')
selected = C.bool(node.getAttribute('selected') or C.BOOL_FALSE)
if not name or not isinstance(data, TabsContainer):
raise InvalidXMLUI
if self.type == 'param':
self._current_category = name #XXX: awful hack because params need category and we don't keep parent
tab_cont = data
new_tab = tab_cont._xmluiAddTab(label or name)
new_tab = tab_cont._xmluiAddTab(label or name, selected)
self._parseChilds(new_tab, node, ('widget', 'container'))
elif node.nodeName == 'row':