prev/next label fix in viewer, inout highlight, modify folder layout, ffmpeg scan...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / vwindowgui.C
index f446a0f475f758b70bae1c8e72cdc7ff7e10846d..bc423328da44ebbc7c42b767fdd12c8837439a13 100644 (file)
@@ -112,6 +112,7 @@ void VWindowGUI::draw_wave()
        int w = mwindow->edl->session->output_w;
        int h = mwindow->edl->session->output_h;
        VFrame *vframe = new VFrame(w, h, BC_RGB888);
+       vframe->clear_frame();
        int sample_rate = mwindow->edl->get_sample_rate();
        int channels = mwindow->edl->session->audio_channels;
        if( channels > 2 ) channels = 2;
@@ -200,9 +201,9 @@ void VWindowGUI::update_sources(const char *title)
 
 void VWindowGUI::create_objects()
 {
+       lock_window("VWindowGUI::create_objects");
        in_point = 0;
        out_point = 0;
-       lock_window("VWindowGUI::create_objects");
        set_icon(mwindow->theme->get_image("vwindow_icon"));
 
 //printf("VWindowGUI::create_objects 1\n");
@@ -461,26 +462,22 @@ void VWindowGUI::drag_motion()
 
 int VWindowGUI::drag_stop()
 {
-       if(get_hidden()) return 0;
+       if( get_hidden() ) return 0;
 
-       if(highlighted &&
-               mwindow->session->current_operation == DRAG_ASSET)
-       {
+       if( highlighted &&
+           mwindow->session->current_operation == DRAG_ASSET ) {
                highlighted = 0;
                canvas->draw_refresh();
                unlock_window();
 
-               Indexable *indexable = mwindow->session->drag_assets->size() ?
-                       mwindow->session->drag_assets->get(0) :
-                       0;
-               EDL *edl = mwindow->session->drag_clips->size() ?
-                       mwindow->session->drag_clips->get(0) :
-                       0;
-               if(indexable)
+               Indexable *indexable =
+                       mwindow->session->drag_assets->size() > 0 ?
+                               (Indexable *)mwindow->session->drag_assets->get(0) :
+                       mwindow->session->drag_clips->size() > 0 ?
+                               (Indexable *)mwindow->session->drag_clips->get(0) : 0;
+               if( indexable )
                        vwindow->change_source(indexable);
-               else
-               if(edl)
-                       vwindow->change_source(edl);
+
                lock_window("VWindowGUI::drag_stop");
                return 1;
        }
@@ -601,7 +598,7 @@ void VWindowEditing::toggle_label()
        }
 }
 
-void VWindowEditing::prev_label()
+void VWindowEditing::prev_label(int cut)
 {
        if(vwindow->get_edl())
        {
@@ -631,7 +628,7 @@ void VWindowEditing::prev_label()
        }
 }
 
-void VWindowEditing::next_label()
+void VWindowEditing::next_label(int cut)
 {
        if(vwindow->get_edl())
        {
@@ -860,6 +857,12 @@ void VWindowCanvas::draw_refresh(int flush)
        }
 }
 
+int VWindowCanvas::need_overlays()
+{
+       if( gui->highlighted ) return 1;
+       return 0;
+}
+
 void VWindowCanvas::draw_overlays()
 {
        if( gui->highlighted )