repair default keyframe load, tweak init default histogram threshold
[goodguy/history.git] / cinelerra-5.1 / cinelerra / edit.C
index 9eb0d9d8f885aedabd0c9aac3d745a6b9a97e64d..c680d8c634c4854ba86eb64af4eae0449ac17d01 100644 (file)
@@ -32,7 +32,6 @@
 #include "localsession.h"
 #include "plugin.h"
 #include "mainsession.h"
-#include "nestededls.h"
 #include "strack.h"
 #include "trackcanvas.h"
 #include "tracks.h"
@@ -190,7 +189,7 @@ int Edit::copy(int64_t start,
                                file->append_tag();
                        }
 
-                       if(transition)
+                       if(transition && startsource_in_selection == startsource)
                        {
                                transition->save_xml(file);
                        }
@@ -242,7 +241,7 @@ int Edit::silence()
 
 void Edit::copy_from(Edit *edit)
 {
-       this->nested_edl = edl->nested_edls->get_copy(edit->nested_edl);
+       this->nested_edl = edl->nested_edls.get_nested(edit->nested_edl);
        this->asset = edl->assets->update(edit->asset);
        this->startsource = edit->startsource;
        this->startproject = edit->startproject;
@@ -554,7 +553,6 @@ int Edit::shift_start_out(int edit_mode,
                                startproject -= cut_length;
                                startsource -= cut_length;
                                length += cut_length;
-printf("Edit::shift_start_out 2\n");
                        }
                        else
                        {   // Clear entire previous edit
@@ -824,3 +822,23 @@ int Edit::select_handle(float view_start, float zoom_units, int cursor_x, int cu
        return 0;
 }
 
+void Edit::get_title(char *title)
+{
+       if( user_title[0] ) {
+               strcpy(title, user_title);
+               return;
+       }
+       Indexable *idxbl = asset ? (Indexable*)asset : (Indexable*)nested_edl;
+       if( !idxbl ) {
+               title[0] = 0;
+               return;
+       }
+       FileSystem fs;
+       fs.extract_name(title, idxbl->path);
+       if( asset || track->data_type == TRACK_AUDIO ) {
+               char number[BCSTRLEN];
+               sprintf(number, " #%d", channel + 1);
+               strcat(title, number);
+       }
+}
+