reload plugin btn in prefs, speed gang fader tweaks
[goodguy/history.git] / cinelerra-5.1 / cinelerra / keyframepopup.C
index 362e51e804031be158d68f80661aea4ba2a413e0..7624da1631574fc7a8d16471c9a4f70110ec8f5c 100644 (file)
@@ -49,6 +49,7 @@
 #include "theme.h"
 #include "timelinepane.h"
 #include "track.h"
+#include "trackcanvas.h"
 #include "vtrack.h"
 
 KeyframePopup::KeyframePopup(MWindow *mwindow, MWindowGUI *gui)
@@ -651,12 +652,20 @@ void KeySpeedPatch::update_speed(float v)
 {
        patch->change_source = 1;
        double position = mwindow->edl->local_session->get_selectionstart(1);
-       Autos *speed_autos = patch->track->automation->autos[AUTOMATION_SPEED];
+       Track *track = patch->track;
+       Autos *speed_autos = track->automation->autos[AUTOMATION_SPEED];
        int need_undo = !speed_autos->auto_exists_for_editing(position);
 
        mwindow->undo->update_undo_before(_("speed"), need_undo ? 0 : this);
        FloatAuto *current = (FloatAuto*)speed_autos->get_auto_for_editing(position);
+       float change = v - current->get_value();
        current->set_value(v);
+       if( track->gang && track->record ) {
+               TrackCanvas *track_canvas = patch->patchbay->pane->canvas;
+               track_canvas->fill_ganged_autos(1, change, track, current);
+               track_canvas->update_ganged_autos(0, track, current);
+               track_canvas->clear_ganged_autos();
+       }
        mwindow->undo->update_undo_after(_("speed"), LOAD_AUTOMATION+LOAD_EDITS);
        patch->change_source = 0;