Clamp timeline mouse position to actual range

This commit is contained in:
René Stadler 2007-11-22 11:03:09 +02:00 committed by Stefan Sauer
parent 13a1310e44
commit 98b381c7d9

View file

@ -551,6 +551,12 @@ class TimelineFeature (FeatureBase):
data = self.timeline.freq_sentinel.data
if not data:
return True
if pos < 0:
pos = 0
elif pos >= len (data):
pos = len (data) - 1
count = sum (data[:pos + 1])
row = self.log_model[count]