X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ftimebar.C;h=7d25fb2c3195e37563ad58db99cefa8df4427a2c;hp=03fa0357526810069023c7e9bd528a6ebdd2530a;hb=502b6f3b6fd04f6b01c6d70dcb81aa304dd0db1c;hpb=0513350234a8dcd08e5a0117d5121724ef7b76b6 diff --git a/cinelerra-5.1/cinelerra/timebar.C b/cinelerra-5.1/cinelerra/timebar.C index 03fa0357..7d25fb2c 100644 --- a/cinelerra-5.1/cinelerra/timebar.C +++ b/cinelerra-5.1/cinelerra/timebar.C @@ -519,24 +519,9 @@ int TimeBar::draw() double TimeBar::get_edl_length() { - edl_length = 0; - - if( get_edl() ) { -//printf("TimeBar::get_edl_length 1 %f\n", get_edl()->tracks->total_length()); - edl_length = get_edl()->tracks->total_length(); - } - -//printf("TimeBar::get_edl_length 2\n"); - if( !EQUIV(edl_length, 0) ) { -//printf("TimeBar::get_edl_length 3\n"); - time_per_pixel = edl_length / get_w(); -//printf("TimeBar::get_edl_length 4\n"); - } - else { - time_per_pixel = 0; - } -//printf("TimeBar::get_edl_length 5\n"); - + edl_length = get_edl() ? get_edl()->tracks->total_length() : 0; + int w1 = get_w()-1; + time_per_pixel = !EQUIV(edl_length, 0) ? edl_length/w1 : w1; return edl_length; }