Fix T87162: Measure Tool Not Working
The non-enabled gizmo was overwriting the projected coordinate value.
This commit is contained in:
parent
321eef6a0c
commit
62f8d9e478
Notes:
blender-bot
2023-02-14 08:49:53 +01:00
Referenced by issue #87162, Measure Tool Not Working
|
@ -412,6 +412,7 @@ void ED_gizmotypes_snap_3d_data_get(
|
|||
wmGizmo *gz, float r_loc[3], float r_nor[3], int r_elem_index[3], int *r_snap_elem)
|
||||
{
|
||||
SnapGizmo3D *snap_gizmo = (SnapGizmo3D *)gz;
|
||||
BLI_assert(snap_gizmo->is_enabled);
|
||||
if (r_loc) {
|
||||
copy_v3_v3(r_loc, snap_gizmo->loc);
|
||||
}
|
||||
|
|
|
@ -389,7 +389,9 @@ static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph,
|
|||
ED_gizmotypes_snap_3d_update(
|
||||
snap_gizmo, depsgraph, ruler_info->region, v3d, ruler_info->wm, mval_fl);
|
||||
|
||||
ED_gizmotypes_snap_3d_data_get(snap_gizmo, co, NULL, NULL, NULL);
|
||||
if (ED_gizmotypes_snap_3d_is_enabled(snap_gizmo)) {
|
||||
ED_gizmotypes_snap_3d_data_get(snap_gizmo, co, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue