UI: Do Not Display Negative Zero Floats
Display negative zero floats as regular zero. Does not alter underlying value. Differential Revision: https://developer.blender.org/D4795 Reviewed by Brecht Van Lommel
This commit is contained in:
parent
285353c252
commit
c0eb6faa47
|
@ -3481,6 +3481,9 @@ static void ui_but_build_drawstr_float(uiBut *but, double value)
|
|||
subtype = RNA_property_subtype(but->rnaprop);
|
||||
}
|
||||
|
||||
/* Change negative zero to regular zero, without altering anything else. */
|
||||
value += +0.0f;
|
||||
|
||||
if (value == (double)FLT_MAX) {
|
||||
STR_CONCAT(but->drawstr, slen, "inf");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue