change popupmenu behaviour, few minor fixups
[goodguy/history.git] / cinelerra-5.1 / cinelerra / edit.C
index 0ede9b9ef2a34acfc7dc22f38bcb52771b469055..0792fa443c5a3c179b1306c6f696c2f7e736b9eb 100644 (file)
@@ -213,10 +213,8 @@ int64_t Edit::get_source_end(int64_t default_)
 void Edit::insert_transition(char *title)
 {
 //printf("Edit::insert_transition this=%p title=%p title=%s\n", this, title, title);
-       detach_transition();
-       transition = new Transition(edl,
-               this,
-               title,
+       delete transition;
+       transition = new Transition(edl, this, title,
                track->to_units(edl->session->default_transition_length, 1));
 }
 
@@ -228,10 +226,7 @@ void Edit::detach_transition()
 
 int Edit::silence()
 {
-       if(asset || nested_edl)
-               return 0;
-       else
-               return 1;
+       return asset || nested_edl ? 0 : 1;
 }