Fix camera gizmo sensor check

Also correct wrong but harmless assignment.
This commit is contained in:
2018-12-01 19:38:37 +11:00
parent 2699ababa9
commit 32d46f7de6
2 changed files with 2 additions and 2 deletions

View File

@@ -4381,7 +4381,7 @@ static void ui_numedit_set_active(uiBut *but)
/* we can click on the side arrows to increment/decrement,
* or click inside to edit the value directly */
int mx = data->window->eventstate->x;
int my = data->window->eventstate->x;
int my = data->window->eventstate->y;
ui_window_to_block(data->region, but->block, &mx, &my);
if (mx < (but->rect.xmin + handle_width)) {

View File

@@ -224,7 +224,7 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmGizmoGroup *gzgroup)
(ca->drawsize * range) :
(scale_matrix * range /
/* Half sensor, intentionally use sensor from camera and not calculated above. */
(0.5f * ((ca->sensor_fit == CAMERA_SENSOR_FIT_HOR) ? ca->sensor_x : ca->sensor_x))));
(0.5f * ((ca->sensor_fit == CAMERA_SENSOR_FIT_HOR) ? ca->sensor_x : ca->sensor_y))));
WM_gizmo_target_property_def_rna_ptr(widget, gz_prop_type, &camera_ptr, prop, -1);
}