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:
commit
f4a5ca0122
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user