From: Good Guy Date: Sun, 16 Dec 2018 22:31:59 +0000 (-0700) Subject: allow multiple edits for edit user title update X-Git-Tag: 2019-08~149 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=e26fa8bc220d47d1c35618b6b6d971188afe7fdd;p=goodguy%2Fcinelerra.git allow multiple edits for edit user title update --- diff --git a/cinelerra-5.1/cinelerra/editpopup.C b/cinelerra-5.1/cinelerra/editpopup.C index cbe07b5d..7ba0e6a1 100644 --- a/cinelerra-5.1/cinelerra/editpopup.C +++ b/cinelerra-5.1/cinelerra/editpopup.C @@ -332,7 +332,22 @@ void EditUserTitleDialogThread::handle_done_event(int result) if( result ) return; MWindow *mwindow = edit_title->mwindow; EditPopup *popup = edit_title->popup; - strcpy(popup->edit->user_title, window->title_text->get_text()); + EDL *edl = mwindow->edl; + const char *text = window->title_text->get_text(); + int count = 0; + for( Track *track=edl->tracks->first; track; track=track->next ) { + if( !track->record ) continue; + for( Edit *edit=track->edits->first; edit; edit=edit->next ) { + if( !edit->is_selected ) continue; + strcpy(edit->user_title, text); + ++count; + } + } + if( count ) + edl->tracks->clear_selected_edits(); + else if( popup->edit ) { + strcpy(popup->edit->user_title, text); + } mwindow->gui->lock_window("EditUserTitleDialogThread::handle_done_event"); mwindow->gui->draw_canvas(1, 0); mwindow->gui->flash_canvas(1);