repair vaapi encode_frame, fix segv on unreadable asset, update crop resource icon...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / trackcanvas.C
index 97fe7a27883eb136660f2466c32ac99180e9f6c7..771b88e7845b13b7405d0ec14a20369143567d9b 100644 (file)
@@ -880,6 +880,14 @@ void TrackCanvas::draw_resources(int mode,
 
                        }
                }
+               int64_t track_x, track_y, track_w, track_h;
+               track_dimensions(current,
+                       track_x, track_y, track_w, track_h);
+               set_color((~get_resources()->get_bg_color()) & 0xffffff);
+               set_opaque();
+               int x1 = track_x, x2 = x1+track_w;
+               int y1 = track_y+track_h-1;
+               draw_line(x1,y1, x2,y1, background_pixmap);
        }
 
 
@@ -1888,6 +1896,8 @@ void TrackCanvas::refresh_plugintoggles()
 
 void TrackCanvas::draw_hard_edges()
 {
+       if( !mwindow->edl->session->auto_conf->hard_edges )
+               return;
        int64_t x, y, w, h;
 
        for(Track *track = mwindow->edl->tracks->first; track; track = track->next) {
@@ -3663,16 +3673,20 @@ int TrackCanvas::draw_hairline(Auto *auto_keyframe, int color, int show)
        set_color(color);
        draw_line(ax, 0, ax, get_h());
 
+       char text[BCSTRLEN];
        if( show ) {
-               char text[BCSTRLEN];
                if( auto_keyframe->is_floatauto() ) {
                        FloatAuto *float_auto = (FloatAuto *)auto_keyframe;
                        sprintf(text, "%0.2f", float_auto->get_value());
                }
-               else {
+               else if( auto_keyframe->is_intauto() ) {
                        IntAuto *int_auto = (IntAuto *)auto_keyframe;
                        sprintf(text, "%d", int_auto->value);
                }
+               else
+                       show = 0;
+       }
+       if( show ) {
                int font = MEDIUMFONT;
                int tw = get_text_width(font, text)  + TOOLTIP_MARGIN * 2;
                int th = get_text_height(font, text) + TOOLTIP_MARGIN * 2;
@@ -4795,7 +4809,7 @@ int TrackCanvas::do_edit_handles(int cursor_x, int cursor_y, int button_press,
                        update_overlay = 1;
                }
        }
-       else if( result < 0 ) {
+       else if( result < 0 && !edit_result->silence() ) {
                mwindow->undo->update_undo_before();
                if( !shift_down() ) {
                        if( handle_result == 0 )