widget: Fix set_buttons on widgets where properties are disabled.
Fix #3008
This commit is contained in:
parent
115a151ac1
commit
4c5fd3f222
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue