X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindowgui.C;h=eb42c679f72f339c3bdcf60730eda2c5140c6849;hp=9c29ec997890eb21bcdd92ec752cc1365a2ba26b;hb=21af3206552d78919dad02f83c08439bedb05c89;hpb=98e035865979cda9805a58a85d52f8d70a7ec54e diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 9c29ec99..eb42c679 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -237,7 +237,6 @@ void VWindowGUI::create_objects() canvas = new VWindowCanvas(mwindow, this); canvas->create_objects(mwindow->edl); - canvas->use_vwindow(); char vsplash_path[BCTEXTLEN]; int vsplash_len = sizeof(vsplash_path)-1; snprintf(vsplash_path, vsplash_len, "%s/vsplash.png", File::get_cindat_path()); @@ -774,6 +773,12 @@ VWindowCanvas::VWindowCanvas(MWindow *mwindow, VWindowGUI *gui) this->gui = gui; } +void VWindowCanvas::create_objects(EDL *edl) +{ + Canvas::create_objects(edl); + canvas_menu->add_item(new CanvasPopupRemoveSource(this)); +} + void VWindowCanvas::zoom_resize_window(float percentage) { EDL *edl = gui->vwindow->get_edl(); @@ -824,14 +829,14 @@ void VWindowCanvas::close_source() void VWindowCanvas::draw_refresh(int flush) { - EDL *edl = gui->vwindow->get_edl(); - if( !get_canvas()->get_video_on() ) { int cw = get_canvas()->get_w(), ch = get_canvas()->get_h(); get_canvas()->clear_box(0, 0, cw, ch); - int ow = edl ? get_output_w(edl) : 0; - int oh = edl ? get_output_h(edl) : 0; - if( ow > 0 && oh > 0 && refresh_frame ) { + } + EDL *edl = gui->vwindow->get_edl(); + if( refresh_frame && edl ) { + int ow = get_output_w(edl), oh = get_output_h(edl); + if( ow > 0 && oh > 0 ) { float in_x1, in_y1, in_x2, in_y2; float out_x1, out_y1, out_x2, out_y2; get_transfers(edl, @@ -851,6 +856,8 @@ void VWindowCanvas::draw_refresh(int flush) (int)(in_x2 - in_x1), (int)(in_y2 - in_y1), 0); } + } + if( !get_canvas()->get_video_on() ) { draw_overlays(); get_canvas()->flash(flush); }