tools, frontends (xmlui): allow to select a tab when adding it
This commit is contained in:
parent
fe5cc0ac0a
commit
a90bcacfe9
1 changed files with 32 additions and 8 deletions
|
|
@ -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':
|
||||
|
|
|
|||
Loading…
Reference in a new issue