[Bf-blender-cvs] [d148c79061b] temp-lanpr-staging: UI: Finalize old TODO in UI float number handling.
Bastien Montagne
noreply at git.blender.org
Fri Aug 16 03:04:39 CEST 2019
Commit: d148c79061bb639848d6c11b14a195f80def592f
Author: Bastien Montagne
Date: Thu Aug 15 11:07:44 2019 +0200
Branches: temp-lanpr-staging
https://developer.blender.org/rBd148c79061bb639848d6c11b14a195f80def592f
UI: Finalize old TODO in UI float number handling.
Just enable some commented-out code from rB636289b755f6ce (disabled at
that time because we were too close of 2.79 release...).
Issue raised in D5486, thanks.
===================================================================
M source/blender/editors/interface/interface.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index f9c65249918..7a123599be5 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2553,8 +2553,8 @@ void ui_but_string_get_ex(uiBut *but,
}
}
else {
+ const int int_digits_num = integer_digits_f(value);
if (use_exp_float) {
- const int int_digits_num = integer_digits_f(value);
if (int_digits_num < -6 || int_digits_num > 12) {
BLI_snprintf(str, maxlen, "%.*g", prec, value);
if (r_use_exp_float) {
@@ -2568,10 +2568,8 @@ void ui_but_string_get_ex(uiBut *but,
}
}
else {
-#if 0 /* TODO, but will likely break some stuff, so better after 2.79 release. */
prec -= int_digits_num;
CLAMP(prec, 0, UI_PRECISION_FLOAT_MAX);
-#endif
BLI_snprintf(str, maxlen, "%.*f", prec, value);
}
}
More information about the Bf-blender-cvs
mailing list