fix(w.w.template) draw
The draw method exists only for widgets. When dealing with more complex widget, this method is not necessary implemented (i.e. with layouts). We need to check the method is defined by the child before calling it.
This commit is contained in:
parent
f12bb57c66
commit
cd5dda385e
|
@ -40,7 +40,9 @@ function template:fit(context, width, height)
|
||||||
end
|
end
|
||||||
|
|
||||||
function template:draw(...)
|
function template:draw(...)
|
||||||
return self._private.widget:draw(...)
|
if type(self._private.widget.draw) == "function" then
|
||||||
|
return self._private.widget:draw(...)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function template:_do_update_now()
|
function template:_do_update_now()
|
||||||
|
|
Loading…
Reference in New Issue