Fix #133367: Use BKE_unit_value_as_string_scaled for ruler gizmo

`BKE_unit_value_as_string` was modified in e949ff7334
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
This commit is contained in:
YimingWu 2025-01-22 03:51:45 +01:00 committed by YimingWu
parent e3c0224d16
commit e7efb704fa

View file

@ -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);
}
}
}