diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2017-11-19 11:58:09 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-19 11:58:09 +0700 |
commit | 40574c1fc0ca37f1407cc75d56f48cebd468d482 (patch) | |
tree | c44f3a2f879cfc3d1334909605a0daa1b8c3e487 | |
parent | b1fefe2245954cc9e76b4966d7c6eab60c5a7a43 (diff) | |
parent | a5973f4071128e5f7094120eb40cab2388c82069 (diff) |
Merge pull request #13026 from kbake/line_edit_ignored_expand_to_len_12447
Allow LineEdit's expand_to_len be set via inspector
-rw-r--r-- | scene/gui/line_edit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 5d3e5ec0e8..f7bf1cd9ea 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1309,6 +1309,7 @@ void LineEdit::set_expand_to_text_length(bool p_enabled) { expand_to_text_length = p_enabled; minimum_size_changed(); + set_window_pos(0); } bool LineEdit::get_expand_to_text_length() const { @@ -1428,7 +1429,7 @@ void LineEdit::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "max_length"), "set_max_length", "get_max_length"); ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "editable"), "set_editable", "is_editable"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "secret"), "set_secret", "is_secret"); - ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "expand_to_len"), "set_expand_to_text_length", "get_expand_to_text_length"); + ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand_to_text_length"), "set_expand_to_text_length", "get_expand_to_text_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_focus_mode", "get_focus_mode"); ADD_GROUP("Placeholder", "placeholder_"); ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "placeholder_text"), "set_placeholder", "get_placeholder"); |