X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvtrack.C;h=c8a34e45931571fad1b4fc8d150571c3e663c367;hp=c61ee3c370ba7ebd02445e9eeec5493ec508ff4d;hb=a19a685a46ddc630010788707d9e5b9d2342af46;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd diff --git a/cinelerra-5.1/cinelerra/vtrack.C b/cinelerra-5.1/cinelerra/vtrack.C index c61ee3c3..c8a34e45 100644 --- a/cinelerra-5.1/cinelerra/vtrack.C +++ b/cinelerra-5.1/cinelerra/vtrack.C @@ -85,11 +85,9 @@ int VTrack::copy_settings(Track *track) 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); } @@ -107,7 +105,7 @@ int VTrack::load_defaults(BC_Hash *defaults) void VTrack::set_default_title() { - Track *current = ListItem::owner->first; + Track *current = ListItem::list->first; int i; for(i = 0; current; current = NEXT) { @@ -119,16 +117,8 @@ void VTrack::set_default_title() 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)