ensure playhead cannot be dragged below 0 in the TimelineViewBase
This commit is contained in:
@@ -89,7 +89,7 @@ bool TimelineViewBase::PlayheadMove(QMouseEvent *event)
|
||||
QPointF scene_pos = mapToScene(event->pos());
|
||||
rational mouse_time = SceneToTime(scene_pos.x());
|
||||
|
||||
int64_t target_ts = Timecode::time_to_timestamp(mouse_time, timebase());
|
||||
int64_t target_ts = qMax(static_cast<int64_t>(0), Timecode::time_to_timestamp(mouse_time, timebase()));
|
||||
|
||||
SetTime(target_ts);
|
||||
emit TimeChanged(target_ts);
|
||||
|
||||
Reference in New Issue
Block a user