diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-10-15 20:24:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-15 20:24:43 +0200 |
commit | fedd3f0cc66b6042030779eb3dc2476b76617a89 (patch) | |
tree | d5e03db5f9ce68c209607f0bf81a068c0098cefa | |
parent | ba91747efece0cbefd3dbd6ad67d4dc6ecfca4af (diff) | |
parent | 02c7566b50f1e533852100b66cb20ec1a8f44b30 (diff) |
Merge pull request #11989 from minifigmaster125/export-fix
Fix export(float ...) so that step is .01
-rw-r--r-- | editor/property_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 658f67d6a4..b7cc9347f2 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -376,7 +376,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: if (hint == PROPERTY_HINT_RANGE) { int c = hint_text.get_slice_count(","); - float min = 0, max = 100, step = 1; + float min = 0, max = 100, step = type == Variant::REAL ? .01 : 1; if (c >= 1) { if (!hint_text.get_slice(",", 0).empty()) @@ -3032,7 +3032,7 @@ void PropertyEditor::update_tree() { if (p.hint == PROPERTY_HINT_SPRITE_FRAME || p.hint == PROPERTY_HINT_RANGE || p.hint == PROPERTY_HINT_EXP_RANGE) { int c = p.hint_string.get_slice_count(","); - float min = 0, max = 100, step = 1; + float min = 0, max = 100, step = p.type == Variant::REAL ? .01 : 1; if (c >= 1) { min = p.hint_string.get_slice(",", 0).to_double(); |