From: Good Guy Date: Fri, 4 Sep 2020 15:17:01 +0000 (-0600) Subject: fix auto id 'that' blunder, tweak keyfrm popup speed undo X-Git-Tag: 2020-09~14 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=25e944875e181186eeb59a124c1822e5b55d2248;p=goodguy%2Fcinelerra.git fix auto id 'that' blunder, tweak keyfrm popup speed undo --- diff --git a/cinelerra-5.1/cinelerra/auto.C b/cinelerra-5.1/cinelerra/auto.C index 03d4aa01..cd950dad 100644 --- a/cinelerra-5.1/cinelerra/auto.C +++ b/cinelerra-5.1/cinelerra/auto.C @@ -69,7 +69,7 @@ void Auto::copy(int64_t start, int64_t end, FileXML *file, int default_only) void Auto::copy_from(Auto *that) { - this->orig_id = orig_id; + this->orig_id = that->orig_id; this->position = that->position; } diff --git a/cinelerra-5.1/cinelerra/keyframepopup.C b/cinelerra-5.1/cinelerra/keyframepopup.C index 83086792..c3dcaea1 100644 --- a/cinelerra-5.1/cinelerra/keyframepopup.C +++ b/cinelerra-5.1/cinelerra/keyframepopup.C @@ -629,6 +629,7 @@ KeySpeedPatch::KeySpeedPatch(MWindow *mwindow, PatchGUI *gui, { this->mwindow = mwindow; this->gui = gui; + need_undo = 1; } KeySpeedPatch::~KeySpeedPatch() { @@ -693,8 +694,10 @@ void KeySpeedPatch::update_speed(float v) float change = v - current->get_value(gui->edge); if( !change ) return; gui->change_source = 1; - int need_undo = !speed_autos->auto_exists_for_editing(position); - mwindow->undo->update_undo_before(_("speed"), need_undo ? 0 : this); + if( need_undo ) { + need_undo = 0; + mwindow->undo->update_undo_before(_("speed"), this); + } current->bump_value(v, gui->edge, gui->span); if( track->is_ganged() ) { TrackCanvas *track_canvas = gui->patchbay->pane->canvas; @@ -720,8 +723,10 @@ int KeySpeedOK::handle_event() { MWindow *mwindow = key_speed_patch->mwindow; mwindow->speed_after(1, 1); - mwindow->undo->update_undo_after(_("speed"), + if( !key_speed_patch->need_undo ) { + mwindow->undo->update_undo_after(_("speed"), LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR); + } mwindow->resync_guis(); mwindow->gui->close_keyvalue_popup(); return 1; diff --git a/cinelerra-5.1/cinelerra/keyframepopup.h b/cinelerra-5.1/cinelerra/keyframepopup.h index c2b16311..16342eb0 100644 --- a/cinelerra-5.1/cinelerra/keyframepopup.h +++ b/cinelerra-5.1/cinelerra/keyframepopup.h @@ -210,6 +210,7 @@ public: KeySpeedOK *key_speed_ok; KeySpeedAutoEdge *auto_edge; KeySpeedAutoSpan *auto_span; + int need_undo; }; class KeySpeedOK : public BC_Button