bsd lang segv fix, enable bsd lv2, lv2 gui enable fix, proxy/ffmpeg toggle resize...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / keyframepopup.C
index 41fe8d9c187e9f16292485fa28d2d33691d58e03..cef8b2701a62e2aaeaba0f724d493f3426242d65 100644 (file)
@@ -187,7 +187,9 @@ KeyframePopupDelete::~KeyframePopupDelete()
 int KeyframePopupDelete::handle_event()
 {
        mwindow->undo->update_undo_before(_("delete keyframe"), 0);
+       mwindow->speed_before();
        delete popup->keyframe_auto;
+       mwindow->speed_after(1);
        mwindow->undo->update_undo_after(_("delete keyframe"), LOAD_ALL);
 
        mwindow->save_backup();
@@ -229,22 +231,6 @@ KeyframePopupShow::~KeyframePopupShow()
 {
 }
 
-PatchGUI *KeyframePopupShow::get_patchgui(Track *track)
-{
-       PatchGUI *patchgui = 0;
-       TimelinePane **panes = mwindow->gui->pane;
-       for( int i=0; i<TOTAL_PANES && !patchgui; ++i ) {
-               if( !panes[i] ) continue;
-               PatchBay *patchbay = panes[i]->patchbay;
-               if( !patchbay ) continue;
-               for( int j=0; j<patchbay->patches.total && !patchgui; ++j ) {
-                       if( patchbay->patches.values[j]->track == track )
-                               patchgui = patchbay->patches.values[j];
-               }
-       }
-       return patchgui;
-}
-
 int KeyframePopupShow::handle_event()
 {
        MWindowGUI *mgui = mwindow->gui;
@@ -280,7 +266,7 @@ int KeyframePopupShow::handle_event()
 
                default: {
                        show_window = 0;
-                       PatchGUI *patchgui = get_patchgui(popup->keyframe_automation->track);
+                       PatchGUI *patchgui = mwindow->get_patchgui(popup->keyframe_automation->track);
                        if( !patchgui ) break;
 
                        switch( popup->keyframe_autos->autoidx ) {
@@ -438,9 +424,7 @@ int KeyframePopupCopy::handle_event()
                file.terminate_string();
 
                mwindow->gui->lock_window();
-               mwindow->gui->get_clipboard()->to_clipboard(file.string,
-                       strlen(file.string),
-                       SECONDARY_SELECTION);
+               mwindow->gui->to_clipboard(file.string, strlen(file.string), SECONDARY_SELECTION);
                mwindow->gui->unlock_window();
 
        } else
@@ -640,6 +624,7 @@ KeySpeedValue::KeySpeedValue(KeySpeedPatch *key_speed_patch)
        key_speed_patch->mwindow->get_float_auto(key_speed_patch->patch, AUTOMATION_SPEED)->get_value())
 {
        this->key_speed_patch = key_speed_patch;
+       key_speed_patch->mwindow->speed_before();
        set_precision(0.01);
 }
 
@@ -650,6 +635,8 @@ KeySpeedValue::~KeySpeedValue()
 int KeySpeedValue::button_release_event()
 {
        BC_FSlider::button_release_event();
+       key_speed_patch->mwindow->speed_after(1);
+       key_speed_patch->mwindow->resync_guis();
        return 0;
 }
 
@@ -663,7 +650,7 @@ void KeySpeedValue::update_edl()
        mwindow->undo->update_undo_before(_("speed"), need_undo ? 0 : this);
        FloatAuto *current = (FloatAuto*)speed_autos->get_auto_for_editing(position);
        current->set_value(get_value());
-       mwindow->undo->update_undo_after(_("speed"), LOAD_AUTOMATION);
+       mwindow->undo->update_undo_after(_("speed"), LOAD_AUTOMATION+LOAD_EDITS);
 }
 
 int KeySpeedValue::handle_event()