Inspector: Make default float step configurable

Also allow lifting the decimal step formatting with a hint range step
of 0. A new `range_step_decimals()` is added for this to avoid breaking
compatibility on the general purpose `step_decimals()` (which still
returns 0 for an input step of 0).

Supersedes #25470.
Partial fix for #18251.
This commit is contained in:
Rémi Verschelde
2019-07-23 17:27:55 +02:00
parent 4c943cca2c
commit d844e30614
8 changed files with 31 additions and 17 deletions

View File

@@ -1095,7 +1095,7 @@
<argument index="0" name="step" type="float">
</argument>
<description>
Returns the position of the first non-zero digit, after the decimal point.
Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
[codeblock]
# n is 0
n = step_decimals(5)