Allow last image in stack to be selected by slider in ImageView

This commit is contained in:
Kenneth Lyons 2019-06-25 16:08:18 -07:00
parent cd2b16dbae
commit 55d9e8888b

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]