.partsMatrix(): Do not error out for zero or negative parts count

This commit is contained in:
Florian Festi 2017-08-28 23:10:56 +02:00
parent ddcf13bf6c
commit ab750077fa
1 changed files with 3 additions and 0 deletions

View File

@ -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: