hoist duplicate code
This commit is contained in:
parent
44e32f00c7
commit
e541c9ba1e
@ -1903,15 +1903,15 @@ def _arrayToQPath_all(x, y, finiteCheck):
|
|||||||
numchunks = (n + chunksize - 1) // chunksize
|
numchunks = (n + chunksize - 1) // chunksize
|
||||||
minchunks = 3
|
minchunks = 3
|
||||||
|
|
||||||
|
backfill_idx = None
|
||||||
|
if finiteCheck and not all_isfinite:
|
||||||
|
backfill_idx = _compute_backfill_indices(isfinite)
|
||||||
|
|
||||||
if numchunks < minchunks:
|
if numchunks < minchunks:
|
||||||
# too few chunks, batching would be a pessimization
|
# too few chunks, batching would be a pessimization
|
||||||
poly = create_qpolygonf(n)
|
poly = create_qpolygonf(n)
|
||||||
arr = ndarray_from_qpolygonf(poly)
|
arr = ndarray_from_qpolygonf(poly)
|
||||||
|
|
||||||
backfill_idx = None
|
|
||||||
if finiteCheck and not all_isfinite:
|
|
||||||
backfill_idx = _compute_backfill_indices(isfinite)
|
|
||||||
|
|
||||||
if backfill_idx is None:
|
if backfill_idx is None:
|
||||||
arr[:, 0] = x
|
arr[:, 0] = x
|
||||||
arr[:, 1] = y
|
arr[:, 1] = y
|
||||||
@ -1925,10 +1925,6 @@ def _arrayToQPath_all(x, y, finiteCheck):
|
|||||||
path.addPolygon(poly)
|
path.addPolygon(poly)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
backfill_idx = None
|
|
||||||
if finiteCheck and not all_isfinite:
|
|
||||||
backfill_idx = _compute_backfill_indices(isfinite)
|
|
||||||
|
|
||||||
# at this point, we have numchunks >= minchunks
|
# at this point, we have numchunks >= minchunks
|
||||||
|
|
||||||
path = QtGui.QPainterPath()
|
path = QtGui.QPainterPath()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user