diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-01-10 10:34:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-10 10:34:24 +0100 |
commit | c51c7eb5bd173906259ad6bf04714191b7563e2c (patch) | |
tree | 8930955e28d25739a2e7d75d28b9885ba267a435 | |
parent | 83d950b58e25c401f21b0695a59002fbf6198083 (diff) | |
parent | fbd937bd3055bff2722fe79ed501ab421356a926 (diff) |
Merge pull request #34979 from timothyqiu/label-autowrap
Update minimum size on Label::set_autowrap
-rw-r--r-- | scene/gui/label.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 6b12947651..77913efd1c 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -35,9 +35,17 @@ void Label::set_autowrap(bool p_autowrap) { + if (autowrap == p_autowrap) { + return; + } + autowrap = p_autowrap; word_cache_dirty = true; update(); + + if (clip) { + minimum_size_changed(); + } } bool Label::has_autowrap() const { |