add input focus, negate dx,dy for camera drag motion
[goodguy/history.git] / cinelerra-5.1 / cinelerra / cwindowgui.C
index 3b1d0ac8a05913895fb5aa0d6f78cc6ae38c9052..3e980b8b99308e7d89c99de872db4bc413af10cd 100644 (file)
@@ -2987,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) )