improve delays created by vicon drawing locks, reset_cache segv fix, gang track toolt...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mwindowmove.C
index 5abe4e6c20b15cf77c96a46d198f0856b19a085f..2c0479bb947953c8f1383ea1035831ce999498f2 100644 (file)
@@ -356,17 +356,13 @@ void MWindow::zoom_amp(int64_t zoom_amp)
 void MWindow::zoom_atrack(int64_t zoom)
 {
        int64_t old_zoom = edl->local_session->zoom_atrack;
-// scale waveforms
-       edl->local_session->zoom_y = (int64_t)((float)edl->local_session->zoom_y *
-                       zoom / old_zoom);
-       CLAMP(edl->local_session->zoom_y, MIN_AMP_ZOOM, MAX_AMP_ZOOM);
+       CLAMP(zoom, MIN_TRACK_ZOOM, MAX_TRACK_ZOOM);
+       edl->local_session->zoom_atrack = zoom;
 
-// scale tracks
        edl->local_session->zoom_atrack = zoom;
        for( Track *track= edl->tracks->first; track; track=track->next ) {
                if( track->data_type != TRACK_AUDIO ) continue;
-               track->data_h = track->data_h * zoom / old_zoom;
-               bclamp(track->data_h, MIN_TRACK_ZOOM, MAX_TRACK_ZOOM);
+               track->data_h = zoom;
        }
 // shift row position
        for( int i=0; i<TOTAL_PANES; ++i ) edl->local_session->track_start[i] =
@@ -378,12 +374,12 @@ void MWindow::zoom_atrack(int64_t zoom)
 void MWindow::zoom_vtrack(int64_t zoom)
 {
        int64_t old_zoom = edl->local_session->zoom_vtrack;
-// scale tracks
+       CLAMP(zoom, MIN_TRACK_ZOOM, MAX_TRACK_ZOOM);
        edl->local_session->zoom_vtrack = zoom;
+
        for( Track *track= edl->tracks->first; track; track=track->next ) {
                if( track->data_type != TRACK_VIDEO ) continue;
-               track->data_h = track->data_h * zoom / old_zoom;
-               bclamp(track->data_h, MIN_TRACK_ZOOM, MAX_TRACK_ZOOM);
+               track->data_h = zoom;
        }
 // shift row position
        for( int i=0; i<TOTAL_PANES; ++i ) edl->local_session->track_start[i] =
@@ -660,7 +656,7 @@ int MWindow::nearest_plugin_keyframe(int shift_down, int dir)
        double position = dir == PLAY_FORWARD ? end : start;
        double new_position = dir == PLAY_FORWARD ? start : end;
        for( Track *track=edl->tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                for( int i=0; i<track->plugin_set.size(); ++i ) {
                        PluginSet *plugin_set = track->plugin_set[i];
                        int64_t pos = track->to_units(position, 0);
@@ -698,7 +694,7 @@ int MWindow::nearest_auto_keyframe(int shift_down, int dir)
        double position = dir == PLAY_FORWARD ? end : start;
        double new_position = dir == PLAY_FORWARD ? start : end;
        for( Track *track=edl->tracks->first; track; track=track->next ) {
-               if( !track->record ) continue;
+               if( !track->is_armed() ) continue;
                int64_t pos = track->to_units(position, 0);
                for( int i=0; i<AUTOMATION_TOTAL; ++i ) {
                        Autos *autos = track->automation->autos[i];