X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowgui.C;h=26bc2bb01d40dd5a4d31765969ab416f38a04efa;hb=a9a62511f2f31cf17307d877ec4e345bf0925aee;hp=ebb95e9a02429d3137c61dbf3436cc1cdc096f6b;hpb=620f70a943c1f47880ec68a908aa03bf463e741f;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index ebb95e9a..26bc2bb0 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -435,7 +435,9 @@ void CWindowGUI::set_operation(int value) } edit_panel->update(); + unlock_window(); tool_panel->start_tool(value); + lock_window("CWindowGUI::set_operation"); canvas->refresh(0); } @@ -1785,6 +1787,8 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, cx /= n; cy /= n; if( !mask_gui->focused ) mask_gui->set_focused(0, cx, cy); + cx = (cx - half_track_w) * projector_z + projector_x; + cy = (cy - half_track_h) * projector_z + projector_y; output_to_canvas(mwindow->edl, 0, cx, cy); float r = bmax(cvs_win->get_w(), cvs_win->get_h()); float d = 0.007*r; @@ -2079,6 +2083,7 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, case CWINDOW_MASK_TRANSLATE: { if( !mask_gui ) break; + int mode = mask_gui->scale_mode; MaskAuto *keyframe = gui->mask_keyframe; int gang = mask_gui->gang_focus->get_value(); float dx = mask_cursor_x - gui->x_origin; @@ -2093,8 +2098,8 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, MaskPoints &points = sub_mask->points; for( int i=0; ix += dx; - point->y += dy; + if( mode == MASK_SCALE_X || mode == MASK_SCALE_XY ) point->x += dx; + if( mode == MASK_SCALE_Y || mode == MASK_SCALE_XY ) point->y += dy; } } gui->x_origin = mask_cursor_x; @@ -2132,8 +2137,10 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, double ds = accel/64., dt = accel*M_PI/360.; double scale = button_no == WHEEL_UP ? 1.+ds : 1.-ds; int mode = mask_gui->scale_mode; - double xscale = !rotate && (mode == 0 || mode == 2 ) ? scale : 1.; - double yscale = !rotate && (mode == 1 || mode == 2 ) ? scale : 1.; + double xscale = !rotate && (mode == MASK_SCALE_X || + mode == MASK_SCALE_XY ) ? scale : 1.; + double yscale = !rotate && (mode == MASK_SCALE_Y || + mode == MASK_SCALE_XY ) ? scale : 1.; double theta = button_no == WHEEL_UP ? dt : -dt; if( rotate ? theta==0 : scale==1 ) break; float st = sin(theta), ct = cos(theta);