rational: implement NaN mode
Also clarify code where 0 is used as a rational.
This commit is contained in:
@@ -1224,7 +1224,7 @@ void TimelineWidget::RippleTo(Timeline::MovementMode mode)
|
||||
}
|
||||
|
||||
// Find each track's nearest point and determine the overall timeline's nearest point
|
||||
rational closest_point_to_playhead = (mode == Timeline::kTrimIn) ? rational() : RATIONAL_MAX;
|
||||
rational closest_point_to_playhead = (mode == Timeline::kTrimIn) ? 0 : RATIONAL_MAX;
|
||||
|
||||
foreach (const Timeline::EditToInfo& info, tracks) {
|
||||
if (info.nearest_block) {
|
||||
|
||||
@@ -203,7 +203,7 @@ void ViewerWidget::ConnectNodeEvent(ViewerOutput *n)
|
||||
|
||||
SetViewerResolution(vp.width(), vp.height());
|
||||
SetViewerPixelAspect(vp.pixel_aspect_ratio());
|
||||
last_length_ = rational();
|
||||
last_length_ = 0;
|
||||
LengthChangedSlot(n->GetLength());
|
||||
|
||||
ColorManager* color_manager = n->project()->color_manager();
|
||||
@@ -358,7 +358,7 @@ void ViewerWidget::SetAutoCacheEnabled(bool e)
|
||||
|
||||
void ViewerWidget::CacheEntireSequence()
|
||||
{
|
||||
auto_cacher_.ForceCacheRange(TimeRange(rational(), GetConnectedNode()->video_frame_cache()->GetLength()));
|
||||
auto_cacher_.ForceCacheRange(TimeRange(0, GetConnectedNode()->video_frame_cache()->GetLength()));
|
||||
}
|
||||
|
||||
void ViewerWidget::CacheSequenceInOut()
|
||||
|
||||
Reference in New Issue
Block a user