Update minimum size on Label::set_autowrap

If `clip_text` is true, the minimum height is one line if `autowrap` is
true , or one pixel otherwise.
This commit is contained in:
Haoyu Qiu 2020-01-10 14:40:05 +08:00
parent 83d950b58e
commit fbd937bd30

View file

@ -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 {