X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpluginset.C;h=575f04651ce78c10fc33d24958b618ecb4c65ac4;hb=2fba7eab40198b35d9edb20c16bcc1b8c262f7a2;hp=e1f1215e9f6beba10f7bd85ac7f7aa6062296269;hpb=a0ed17a5d6ecf2b010d977bc1f9b7226f24c20f6;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/pluginset.C b/cinelerra-5.1/cinelerra/pluginset.C index e1f1215e..575f0465 100644 --- a/cinelerra-5.1/cinelerra/pluginset.C +++ b/cinelerra-5.1/cinelerra/pluginset.C @@ -44,13 +44,6 @@ PluginSet::~PluginSet() } -PluginSet& PluginSet::operator=(PluginSet& plugins) -{ -printf("PluginSet::operator= 1\n"); - copy_from(&plugins); - return *this; -} - void PluginSet::copy_from(PluginSet *src) { while(last) delete last; @@ -59,6 +52,8 @@ void PluginSet::copy_from(PluginSet *src) Plugin *new_plugin; append(new_plugin = (Plugin*)create_edit()); new_plugin->copy_from(current); +// update gui_id when copying edl + new_plugin->gui_id = current->gui_id; } this->record = src->record; } @@ -165,6 +160,10 @@ Edit* PluginSet::insert_edit_after(Edit *previous_edit) KeyFrame *PluginSet::nearest_keyframe(int64_t pos, int dir) { + if( first && pos < first->startproject ) + pos = first->startproject; + else if( last && pos > last->startproject+last->length ) + pos = last->startproject+last->length; Plugin *plugin = (Plugin*)editof(pos, dir, 0); if( !plugin ) return 0; KeyFrame *keyframe = (KeyFrame *)(dir == PLAY_FORWARD ?