Merge pull request #517 from campagnola/fixes

Small fixes
This commit is contained in:
Luke Campagnola 2017-07-28 16:17:29 -07:00 committed by GitHub
commit 7de20b8847
3 changed files with 11 additions and 3 deletions

View File

@ -214,7 +214,8 @@ class ImageItem(GraphicsObject):
border Sets the pen used when drawing the image border. Default is None. border Sets the pen used when drawing the image border. Default is None.
autoDownsample (bool) If True, the image is automatically downsampled to match the autoDownsample (bool) If True, the image is automatically downsampled to match the
screen resolution. This improves performance for large images and screen resolution. This improves performance for large images and
reduces aliasing. reduces aliasing. If autoDownsample is not specified, then ImageItem will
choose whether to downsample the image based on its size.
================= ========================================================================= ================= =========================================================================

View File

@ -132,6 +132,8 @@ class PlotCurveItem(GraphicsObject):
if any(np.isinf(b)): if any(np.isinf(b)):
mask = np.isfinite(d) mask = np.isfinite(d)
d = d[mask] d = d[mask]
if len(d) == 0:
return (None, None)
b = (d.min(), d.max()) b = (d.min(), d.max())
elif frac <= 0.0: elif frac <= 0.0:
@ -173,7 +175,7 @@ class PlotCurveItem(GraphicsObject):
if self._boundingRect is None: if self._boundingRect is None:
(xmn, xmx) = self.dataBounds(ax=0) (xmn, xmx) = self.dataBounds(ax=0)
(ymn, ymx) = self.dataBounds(ax=1) (ymn, ymx) = self.dataBounds(ax=1)
if xmn is None: if xmn is None or ymn is None:
return QtCore.QRectF() return QtCore.QRectF()
px = py = 0.0 px = py = 0.0

View File

@ -321,9 +321,14 @@ class ForkedProcess(RemoteEventHandler):
#os.kill(pid, 9) #os.kill(pid, 9)
try: try:
self.close(callSync='sync', timeout=timeout, noCleanup=True) ## ask the child process to exit and require that it return a confirmation. self.close(callSync='sync', timeout=timeout, noCleanup=True) ## ask the child process to exit and require that it return a confirmation.
os.waitpid(self.childPid, 0)
except IOError: ## probably remote process has already quit except IOError: ## probably remote process has already quit
pass pass
try:
os.waitpid(self.childPid, 0)
except OSError: ## probably remote process has already quit
pass
self.hasJoined = True self.hasJoined = True
def kill(self): def kill(self):