Fix T58573: Camera lens gizmo error on click

This commit is contained in:
Campbell Barton 2018-12-03 12:55:55 +11:00
parent a205493426
commit 4978ef5ed5
Notes: blender-bot 2023-02-14 10:18:56 +01:00
Referenced by issue #58573, Camera lens sensor gizmo issues
1 changed files with 5 additions and 1 deletions

View File

@ -379,7 +379,11 @@ static void gizmo_arrow_exit(bContext *C, wmGizmo *gz, const bool cancel)
/* Assign incase applying the opetration needs an updated offset
* editmesh bisect needs this. */
if (is_prop_valid) {
data->offset = WM_gizmo_target_property_float_get(gz, gz_prop);
const int transform_flag = RNA_enum_get(arrow->gizmo.ptr, "transform");
const bool constrained = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_CONSTRAINED) != 0;
const bool inverted = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_INVERTED) != 0;
const float value = WM_gizmo_target_property_float_get(gz, gz_prop);
data->offset = gizmo_offset_from_value(data, value, constrained, inverted);
}
return;
}