Fix Label::get_minimum_size not updating cache size for autowrap
This commit is contained in:
parent
6f1513545b
commit
b0b88df016
1 changed files with 4 additions and 5 deletions
|
@ -295,14 +295,13 @@ Size2 Label::get_minimum_size() const {
|
||||||
|
|
||||||
Size2 min_style = get_stylebox("normal")->get_minimum_size();
|
Size2 min_style = get_stylebox("normal")->get_minimum_size();
|
||||||
|
|
||||||
|
// don't want to mutable everything
|
||||||
|
if (word_cache_dirty)
|
||||||
|
const_cast<Label *>(this)->regenerate_word_cache();
|
||||||
|
|
||||||
if (autowrap)
|
if (autowrap)
|
||||||
return Size2(1, clip ? 1 : minsize.height) + min_style;
|
return Size2(1, clip ? 1 : minsize.height) + min_style;
|
||||||
else {
|
else {
|
||||||
|
|
||||||
// don't want to mutable everything
|
|
||||||
if (word_cache_dirty)
|
|
||||||
const_cast<Label *>(this)->regenerate_word_cache();
|
|
||||||
|
|
||||||
Size2 ms = minsize;
|
Size2 ms = minsize;
|
||||||
if (clip)
|
if (clip)
|
||||||
ms.width = 1;
|
ms.width = 1;
|
||||||
|
|
Loading…
Reference in a new issue