wibox.widget.base: do not call set_children if children is nil
This commit is contained in:
parent
0e9a0cdee9
commit
59662bc971
|
@ -112,7 +112,7 @@ looks like this:
|
|||
end
|
||||
widget:after_draw_children(context, cr, width, height)
|
||||
|
||||
The `:set_children()` method is called recursively when setting a widget with
|
||||
The `:set_children()` method gets called recursively when setting a widget with
|
||||
the declarative layout system, therefore the method should be well defined.
|
||||
It should probably hook to the `:add` or `:add_widget` methods or be overridden
|
||||
to do nothing.
|
||||
It should probably hook into the `:add` or `:add_widget` methods or be
|
||||
overridden to do nothing.
|
||||
|
|
|
@ -504,7 +504,9 @@ local function drill(ids, content)
|
|||
end
|
||||
end
|
||||
-- Replace all children (if any) with the new ones.
|
||||
if widgets then
|
||||
l:set_children(widgets)
|
||||
end
|
||||
return l, id
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue