.partsMatrix(): Do not error out for zero or negative parts count
This commit is contained in:
parent
ddcf13bf6c
commit
ab750077fa
|
@ -1531,6 +1531,9 @@ class Boxes:
|
||||||
|
|
||||||
def partsMatrix(self, n, width, move, part, *l, **kw):
|
def partsMatrix(self, n, width, move, part, *l, **kw):
|
||||||
|
|
||||||
|
if n <= 0:
|
||||||
|
return
|
||||||
|
|
||||||
rows = n//width + (1 if n % width else 0)
|
rows = n//width + (1 if n % width else 0)
|
||||||
|
|
||||||
if not move:
|
if not move:
|
||||||
|
|
Loading…
Reference in New Issue