int VTrack::vertical_span(Theme *theme)
{
int track_h = Track::vertical_span(theme);
- int patch_h = 0;
- if(expand_view)
- {
- patch_h += theme->title_h + theme->play_h + theme->fade_h + theme->mode_h;
- }
+ int patch_h = theme->title_h;
+ if( expand_view )
+ patch_h += theme->play_h + theme->fade_h + theme->mode_h;
return MAX(track_h, patch_h);
}
int64_t VTrack::to_units(double position, int round)
{
- if(round)
- {
- return Units::round(position * edl->session->frame_rate);
- }
- else
- {
-// Kludge for rounding errors, just on a smaller scale than formal rounding
- position *= edl->session->frame_rate;
- return Units::to_int64(position);
- }
+ return round ? Units::round(position * edl->session->frame_rate) :
+ Units::to_int64(position * edl->session->frame_rate + 1e-6);
}
double VTrack::to_doubleunits(double position)