From e7efb704fab6eac46dce33bf69a65b4ec3645e4e Mon Sep 17 00:00:00 2001 From: YimingWu Date: Wed, 22 Jan 2025 03:51:45 +0100 Subject: [PATCH] Fix #133367: Use `BKE_unit_value_as_string_scaled` for ruler gizmo `BKE_unit_value_as_string` was modified in e949ff73349426c5aefe to include a `BKE_unit_value_as_string_scaled` version, some places on the interface needs to use the scaled version to show the string, this includes ruler gizmo length text. Pull Request: https://projects.blender.org/blender/blender/pulls/133373 --- source/blender/editors/space_view3d/view3d_gizmo_ruler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc index adb8038d7a3..9185479b042 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc @@ -215,7 +215,8 @@ static void ruler_item_as_string( BLI_snprintf(numstr, numstr_size, "%.*f", prec, ruler_len); } else { - BKE_unit_value_as_string(numstr, numstr_size, ruler_len, prec, B_UNIT_LENGTH, unit, false); + BKE_unit_value_as_string_scaled( + numstr, numstr_size, ruler_len, prec, B_UNIT_LENGTH, unit, false); } } }