@@ -275,6 +275,7 @@ def _list_from_statespec(stuple):
275275def _list_from_layouttuple (tk , ltuple ):
276276 """Construct a list from the tuple returned by ttk::layout, this is
277277 somewhat the reverse of _format_layoutlist."""
278+ ltuple = tk .splitlist (ltuple )
278279 res = []
279280
280281 indx = 0
@@ -293,8 +294,6 @@ def _list_from_layouttuple(tk, ltuple):
293294 indx += 2
294295
295296 if opt == 'children' :
296- if not tk .wantobjects ():
297- val = tk .splitlist (val )
298297 val = _list_from_layouttuple (tk , val )
299298
300299 opts [opt ] = val
@@ -408,8 +407,8 @@ def map(self, style, query_opt=None, **kw):
408407 return _list_from_statespec (self .tk .splitlist (
409408 self .tk .call (self ._name , "map" , style , '-%s' % query_opt )))
410409
411- return _dict_from_tcltuple (
412- self .tk .call (self ._name , "map" , style , * (_format_mapdict (kw ))))
410+ return _dict_from_tcltuple (self . tk . splitlist (
411+ self .tk .call (self ._name , "map" , style , * (_format_mapdict (kw )))))
413412
414413
415414 def lookup (self , style , option , state = None , default = None ):
@@ -463,8 +462,8 @@ def layout(self, style, layoutspec=None):
463462 lspec = "null" # could be any other word, but this may make sense
464463 # when calling layout(style) later
465464
466- return _list_from_layouttuple (self .tk , self . tk . splitlist (
467- self .tk .call (self ._name , "layout" , style , lspec )))
465+ return _list_from_layouttuple (self .tk ,
466+ self .tk .call (self ._name , "layout" , style , lspec ))
468467
469468
470469 def element_create (self , elementname , etype , * args , ** kw ):
0 commit comments