widget: Fix set_buttons on widgets where properties are disabled.

Fix #3008
This commit is contained in:
Emmanuel Lepage Vallee 2020-02-29 18:53:40 -05:00
parent 115a151ac1
commit 4c5fd3f222
1 changed files with 7 additions and 0 deletions

View File

@ -765,6 +765,13 @@ function base.make_widget(proxy, widget_name, args)
return rawget(ret, key)
end
mt.__newindex = function(_, key, value)
if key == "buttons" then
base.widget.set_buttons(ret, value)
else
rawset(ret, key, value)
end
end
end
return setmetatable(ret, mt)