diff options
| author | marynate | 2014-02-27 22:16:00 +0800 |
|---|---|---|
| committer | marynate | 2014-02-27 22:19:30 +0800 |
| commit | 8fb19e58433d5b132590b804a7a573f5e616f745 (patch) | |
| tree | 95a9824ae2583f91df3526c22909c99b13d4fcd1 /scene/gui/line_edit.cpp | |
| parent | a65edb4caabec21654c56552e11aacf0fd9291de (diff) | |
| download | godot-8fb19e58433d5b132590b804a7a573f5e616f745.tar.gz godot-8fb19e58433d5b132590b804a7a573f5e616f745.tar.zst godot-8fb19e58433d5b132590b804a7a573f5e616f745.zip | |
Auto select custom property value field when pop up, user can start typing to change value right away.
Diffstat (limited to 'scene/gui/line_edit.cpp')
| -rw-r--r-- | scene/gui/line_edit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index ad1b7fd66..bd19adf07 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -748,6 +748,11 @@ bool LineEdit::is_secret() const { void LineEdit::select(int p_from, int p_to) { + if (p_from==0 && p_to==0) { + selection_clear(); + return; + } + int len = text.length(); if (p_from<0) p_from=0; |
