X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fatrack.C;h=5ba270e69d928fd6b29e37bcbdeb2bdd1d455cc4;hb=340840559db419a217ccb6adc7de1f96518d2906;hp=1ef123dae4fdd014aa0be421ca415068b56bb9fe;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/atrack.C b/cinelerra-5.1/cinelerra/atrack.C index 1ef123da..5ba270e6 100644 --- a/cinelerra-5.1/cinelerra/atrack.C +++ b/cinelerra-5.1/cinelerra/atrack.C @@ -106,11 +106,9 @@ void ATrack::create_objects() int ATrack::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->meter_h + theme->pan_h; - } + int patch_h = theme->title_h; + if( expand_view ) + patch_h += theme->play_h + theme->fade_h + theme->meter_h + theme->pan_h; return MAX(track_h, patch_h); } @@ -127,7 +125,7 @@ int ATrack::load_defaults(BC_Hash *defaults) void ATrack::set_default_title() { - Track *current = ListItem::owner->first; + Track *current = ListItem::list->first; int i; for(i = 0; current; current = NEXT) { @@ -139,10 +137,8 @@ void ATrack::set_default_title() int64_t ATrack::to_units(double position, int round) { - if(round) - return Units::round(position * edl->session->sample_rate); - else - return Units::to_int64(position * edl->session->sample_rate); + return round ? Units::round(position * edl->session->sample_rate) : + Units::to_int64(position * edl->session->sample_rate + 1e-6); } double ATrack::to_doubleunits(double position)