Cleanup: minor changes to unit comments

This commit is contained in:
Campbell Barton
2025-09-25 13:53:10 +10:00
parent 2f3e6e69df
commit a69dede3f1
2 changed files with 4 additions and 3 deletions

View File

@@ -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,

View File

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