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
|
end
|
||||||
widget:after_draw_children(context, cr, width, height)
|
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.
|
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
|
It should probably hook into the `:add` or `:add_widget` methods or be
|
||||||
to do nothing.
|
overridden to do nothing.
|
||||||
|
|
|
@ -504,7 +504,9 @@ local function drill(ids, content)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Replace all children (if any) with the new ones.
|
-- Replace all children (if any) with the new ones.
|
||||||
|
if widgets then
|
||||||
l:set_children(widgets)
|
l:set_children(widgets)
|
||||||
|
end
|
||||||
return l, id
|
return l, id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue