mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
Clamp timeline mouse position to actual range
This commit is contained in:
parent
13a1310e44
commit
98b381c7d9
1 changed files with 6 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue