add drag edit render_handle_frame
[goodguy/history.git] / cinelerra-5.1 / cinelerra / edit.C
index 4c257cbe964164a274187b3ab11f8d6515048d9f..34157b1fc4472fef297baad683dfe01d8843ff57 100644 (file)
@@ -32,7 +32,7 @@
 #include "localsession.h"
 #include "plugin.h"
 #include "mainsession.h"
-#include "nestededls.h"
+#include "strack.h"
 #include "trackcanvas.h"
 #include "tracks.h"
 #include "transition.h"
@@ -233,13 +233,15 @@ void Edit::detach_transition()
 
 int Edit::silence()
 {
-       return asset || nested_edl ? 0 : 1;
+       return (track->data_type != TRACK_SUBTITLE ?
+               asset || nested_edl :
+               *((SEdit *)this)->get_text()) ? 0 : 1;
 }
 
 
 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;
@@ -551,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
@@ -821,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);
+       }
+}
+