X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowgui.C;h=3e980b8b99308e7d89c99de872db4bc413af10cd;hb=8429c33b548c1493b81793e5568b53dcd29ecb7c;hp=2b11f38b4a36f314eb0e7ab7adb662ea29c89405;hpb=a95193c3fd88733d184f2d460eca1fe6ddf8af28;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 2b11f38b..3e980b8b 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -646,14 +646,12 @@ int CWindowGUI::drag_stop() if(mwindow->session->drag_assets->total || mwindow->session->drag_clips->total) { - mwindow->gui->lock_window("CWindowGUI::drag_stop 5"); + mwindow->gui->lock_window("CWindowGUI::drag_stop 1"); mwindow->undo->update_undo_before(_("insert assets"), 0); - mwindow->gui->unlock_window(); } if(mwindow->session->drag_assets->total) { - mwindow->gui->lock_window("CWindowGUI::drag_stop 1"); mwindow->clear(0); mwindow->load_assets(mwindow->session->drag_assets, mwindow->edl->local_session->get_selectionstart(), @@ -668,7 +666,6 @@ int CWindowGUI::drag_stop() if(mwindow->session->drag_clips->total) { - mwindow->gui->lock_window("CWindowGUI::drag_stop 2"); mwindow->clear(0); mwindow->paste_edls(mwindow->session->drag_clips, LOADMODE_PASTE, @@ -688,7 +685,7 @@ int CWindowGUI::drag_stop() mwindow->gui->update(1, 1, 1, 1, 0, 1, 0); mwindow->undo->update_undo_after(_("insert assets"), LOAD_ALL); mwindow->gui->unlock_window(); - mwindow->sync_parameters(LOAD_ALL); + mwindow->sync_parameters(CHANGE_ALL); } } @@ -1085,6 +1082,15 @@ void CWindowCanvas::draw_refresh(int flush) in_x2 > in_x1 && in_y2 > in_y1) { +// input scaled from session to refresh frame coordinates + int ow = get_output_w(mwindow->edl); + int oh = get_output_h(mwindow->edl); + int rw = refresh_frame->get_w(); + int rh = refresh_frame->get_h(); + float xs = (float)rw / ow; + float ys = (float)rh / oh; + in_x1 *= xs; in_x2 *= xs; + in_y1 *= ys; in_y2 *= ys; // Can't use OpenGL here because it is called asynchronously of the // playback operation. get_canvas()->draw_vframe(refresh_frame, @@ -2311,6 +2317,24 @@ int CWindowCanvas::do_eyedrop(int &rerender, int button_press, int draw) return result; } +int CWindowCanvas::need_overlays() +{ + if( mwindow->edl->session->safe_regions ) return 1; + if( mwindow->edl->session->cwindow_scrollbars ) return 1; + if( gui->highlighted ) return 1; + switch( mwindow->edl->session->cwindow_operation ) { + case CWINDOW_EYEDROP: + if( ! gui->eyedrop_visible ) break; + case CWINDOW_CAMERA: + case CWINDOW_PROJECTOR: + case CWINDOW_CROP: + case CWINDOW_MASK: + case CWINDOW_RULER: + return 1; + } + return 0; +} + void CWindowCanvas::draw_overlays() { if(mwindow->edl->session->safe_regions) @@ -2963,8 +2987,13 @@ int CWindowCanvas::test_bezier(int button_press, { last_center_x = gui->affected_x->get_value(); last_center_y = gui->affected_y->get_value(); - float x = gui->center_x + cursor_x - gui->x_origin; - float y = gui->center_y + cursor_y - gui->y_origin; + float dx = cursor_x - gui->x_origin; + float dy = cursor_y - gui->y_origin; + if(gui->current_operation == CWINDOW_CAMERA ) { + dx = -dx; dy = -dy; + } + float x = gui->center_x + dx; + float y = gui->center_y + dy; gui->affected_x->set_value(x); gui->affected_y->set_value(y); if( !EQUIV(last_center_x, x) || !EQUIV(last_center_y, y) )