X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Flabels.C;h=56105ed1d1e759c4dcda2a3a231a781174a7e57f;hb=bd7011a86f60b4ef1abf11e2667373eba3a98c99;hp=211b8767ff75db8f39965ea6a8247e2bec1cb543;hpb=54cc56bff09f5004b2a6cd454375f06e56acf5a0;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/labels.C b/cinelerra-5.1/cinelerra/labels.C index 211b8767..56105ed1 100644 --- a/cinelerra-5.1/cinelerra/labels.C +++ b/cinelerra-5.1/cinelerra/labels.C @@ -2,6 +2,7 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams + * Copyright (C) 2003-2016 Cinelerra CV contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -272,7 +273,9 @@ void Labels::copy_from(Labels *labels) for(Label *current = labels->first; current; current = NEXT) { - append(new Label(edl, this, current->position, current->textstr)); + Label *new_label = new Label(edl, this, current->position, current->textstr); + new_label->orig_id = current->orig_id; + append(new_label); } } @@ -460,6 +463,13 @@ Label* Labels::next_label(double position) return current; } +Label* Labels::get_label(int id) +{ + Label *current = first; + while( current && current->orig_id != id ) current = NEXT; + return current; +} + int Labels::insert(double start, double length) { // shift every label including the first one back Label *current; @@ -541,6 +551,8 @@ Label* Labels::label_of(double position) Label::Label() : ListItem