Support single callback that do not get any number
This commit is contained in:
parent
4dd61691d2
commit
a2a2695c03
|
@ -391,6 +391,9 @@ class Boxes:
|
||||||
self.ctx.save()
|
self.ctx.save()
|
||||||
self.moveTo(x, y)
|
self.moveTo(x, y)
|
||||||
if callable(callback):
|
if callable(callback):
|
||||||
|
if number is None:
|
||||||
|
callback()
|
||||||
|
else:
|
||||||
callback(number)
|
callback(number)
|
||||||
elif hasattr(callback, '__getitem__'):
|
elif hasattr(callback, '__getitem__'):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue