Merge pull request #963 from ixjlyons/fix-298

Allow last image in stack to be selected by slider in ImageView
This commit is contained in:
Ogi Moore 2019-06-26 00:00:06 -07:00 committed by GitHub
commit f4a5ca0122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -740,7 +740,7 @@ class ImageView(QtGui.QWidget):
return (0,0)
t = slider.value()
xv = self.tVals
if xv is None:
ind = int(t)
@ -748,7 +748,7 @@ class ImageView(QtGui.QWidget):
if len(xv) < 2:
return (0,0)
totTime = xv[-1] + (xv[-1]-xv[-2])
inds = np.argwhere(xv < t)
inds = np.argwhere(xv <= t)
if len(inds) < 1:
return (0,t)
ind = inds[-1,0]