mirror of https://github.com/kivy/kivy.git
graphics: emit a warning when a quad have not enough point in the list (instead of having an exception during build()
This commit is contained in:
parent
4383b1896f
commit
03730cb020
|
@ -723,6 +723,10 @@ cdef class Quad(VertexInstruction):
|
||||||
return self._points
|
return self._points
|
||||||
def __set__(self, points):
|
def __set__(self, points):
|
||||||
self._points = list(points)
|
self._points = list(points)
|
||||||
|
if len(self._points) != 8:
|
||||||
|
raise GraphicException(
|
||||||
|
'Quad: invalid number of points (%d instead of 8' % len(
|
||||||
|
self._points)))
|
||||||
self.flag_update()
|
self.flag_update()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue