diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-03-04 19:59:12 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-07-10 22:56:59 +0200 |
commit | 75f7e1fbf8c7effabbc088a1bacc89ca4826da88 (patch) | |
tree | de1c81b2c44432db0e661eaeeb5a6350be05d568 /editor/editor_node.cpp | |
parent | d26442e709f6361af9ac755ec9291bb43f2cd69b (diff) |
Fix some properties having an invalid float step of `0`
This also clamps the float step in the editor to the lowest value
that is guaranteed to work in all situations (including for 32-bit
floats).
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 64665833df..b3b61f73c0 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6113,7 +6113,9 @@ EditorNode::EditorNode() { EDITOR_DEF_RST("interface/inspector/default_property_name_style", EditorPropertyNameProcessor::STYLE_CAPITALIZED); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_property_name_style", PROPERTY_HINT_ENUM, "Raw,Capitalized,Localized")); EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001); - EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0")); + // The lowest value is equal to the minimum float step for 32-bit floats. + // The step must be set manually, as changing this setting should not change the step here. + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0.0000001,1,0.0000001")); EDITOR_DEF_RST("interface/inspector/disable_folding", false); EDITOR_DEF_RST("interface/inspector/auto_unfold_foreign_scenes", true); EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false); |