undo nested clip bug, wheel zoom redraw fix, uninited vars, shortcuts doc
[goodguy/history.git] / cinelerra-5.1 / cinelerra / vtrack.C
index c61ee3c370ba7ebd02445e9eeec5493ec508ff4d..53a6550b299694ced59a70eaf08649d1853eceec 100644 (file)
@@ -107,7 +107,7 @@ int VTrack::load_defaults(BC_Hash *defaults)
 
 void VTrack::set_default_title()
 {
-       Track *current = ListItem<Track>::owner->first;
+       Track *current = ListItem<Track>::list->first;
        int i;
        for(i = 0; current; current = NEXT)
        {
@@ -119,16 +119,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)