{
float x = 0, y = 0;
float zoom = !value ? get_auto_zoom() : value;
- mwindow->edl->session->cwindow_scrollbars = !value ? 0 : 1;
+ EDL *edl = mwindow->edl;
+ edl->session->cwindow_scrollbars = !value ? 0 : 1;
if( value ) {
- float cx = canvas->get_xscroll() + 0.5f*canvas->w_visible;
- float cy = canvas->get_yscroll() + 0.5f*canvas->h_visible;
- float output_x = cx, output_y = cy;
- canvas->output_to_canvas(mwindow->edl, 0, cx, cy);
- x = output_x - cx / zoom;
- y = output_y - cy / zoom;
+ float cx = 0.5f * canvas->w; x = cx;
+ float cy = 0.5f * canvas->h; y = cy;
+ canvas->canvas_to_output(edl, 0, x, y);
+ canvas->update_zoom(0, 0, zoom);
+ float zoom_x, zoom_y, conformed_w, conformed_h;
+ canvas->get_zooms(edl, 0, zoom_x, zoom_y, conformed_w, conformed_h);
+ x -= cx / zoom_x;
+ y -= cy / zoom_y;
+
}
canvas->update_zoom((int)(x+0.5), (int)(y+0.5), zoom);
lock_window("CWindowGUI::keypress_event 1");
break;
case 'x':
+ if( ctrl_down() || shift_down() || alt_down() ) break;
unlock_window();
mwindow->gui->lock_window("CWindowGUI::keypress_event 2");
mwindow->cut();
}
break;
- case KEY_F1: cwindow_operation = CWINDOW_PROTECT; break;
- case KEY_F2: cwindow_operation = CWINDOW_ZOOM; break;
+ case KEY_F1: if( shift_down() ) { mwindow->toggle_camera_xyz(); break; }
+ cwindow_operation = CWINDOW_PROTECT; break;
+ case KEY_F2: if( shift_down() ) { mwindow->toggle_projector_xyz(); break; }
+ cwindow_operation = CWINDOW_ZOOM; break;
case KEY_F3: cwindow_operation = CWINDOW_MASK; break;
case KEY_F4: cwindow_operation = CWINDOW_RULER; break;
case KEY_F5: cwindow_operation = CWINDOW_CAMERA; break;