diff options
| author | robfram | 2018-05-02 21:15:46 +0200 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-05-13 22:19:42 +0200 |
| commit | a187fb381ee68eae44883a788aa2f871a133a9e9 (patch) | |
| tree | 1e02be056c3831bb16cf2e923f58a45d40d72b28 /scene/gui/line_edit.cpp | |
| parent | 868c44b23949d7d1f677e8e7d6e4832ca2f0510e (diff) | |
| download | godot-a187fb381ee68eae44883a788aa2f871a133a9e9.tar.gz godot-a187fb381ee68eae44883a788aa2f871a133a9e9.tar.zst godot-a187fb381ee68eae44883a788aa2f871a133a9e9.zip | |
Fix placeholders position in `LineEdit` when editing inside the Editor
Editing the `Text` property through the editor causes a wrong
placement of the placeholder, as it calls `LineEdit::clear_internal`,
which was wrongly reseting the cached placeholder width.
Fix #18184.
(cherry picked from commit c17de1f70fcba19f2afdfe49d194b9b175791ea8)
Diffstat (limited to '')
| -rw-r--r-- | scene/gui/line_edit.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index ebc705c04..7fd15a38c 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1135,7 +1135,6 @@ void LineEdit::clear_internal() { _clear_undo_stack(); cached_width = 0; - cached_placeholder_width = 0; cursor_pos = 0; window_pos = 0; undo_text = ""; |
