From a69dede3f1417a8b4b3720ad845aff790065b903 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Sep 2025 13:53:10 +1000 Subject: [PATCH] Cleanup: minor changes to unit comments --- source/blender/blenkernel/BKE_unit.hh | 5 +++-- source/blender/blenkernel/intern/unit.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/BKE_unit.hh b/source/blender/blenkernel/BKE_unit.hh index bf008a5b83d..83090d042e5 100644 --- a/source/blender/blenkernel/BKE_unit.hh +++ b/source/blender/blenkernel/BKE_unit.hh @@ -22,8 +22,9 @@ struct UnitSettings; * \param pad: When true & `prec` is positive, stripped zeroes will be replaced with a space * instead of being removed. * - * \note disabling stripping or enabling padding reduces text "jittering" when changing values. - * Especially with mono-spaced fonts. + * \note Disabling stripping or enabling padding reduces text "jittering" when changing values, + * especially with mono-spaced fonts. However, the values will take up more space, + * so the default is good when there is little movement (e.g. numerical input or mesh overlays). */ size_t BKE_unit_value_as_string(char *str, int str_maxncpy, diff --git a/source/blender/blenkernel/intern/unit.cc b/source/blender/blenkernel/intern/unit.cc index 15435e262c4..1892bf40d20 100644 --- a/source/blender/blenkernel/intern/unit.cc +++ b/source/blender/blenkernel/intern/unit.cc @@ -1855,7 +1855,7 @@ static size_t unit_as_string_main(char *str, if (split && unit_should_be_split(type)) { int length = unit_as_string_split_pair( str, str_maxncpy, value, prec, do_rstrip_zero, usys, main_unit); - /* Failed when length is negative, fall back to no split. */ + /* Split failed when length is negative, fall back to no split. */ if (length >= 0) { return length; }