Merge pull request #77280 from Rindbee/fix-unnecessary-break-in-Label

Fix unnecessary break when calculating the height of visible lines
This commit is contained in:
Rémi Verschelde 2023-08-02 12:15:24 +02:00
commit b156e24216
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 0 additions and 3 deletions

View File

@ -299,9 +299,6 @@ void Label::_update_visible() {
int last_line = MIN(lines_rid.size(), lines_visible + lines_skipped);
for (int64_t i = lines_skipped; i < last_line; i++) {
minsize.height += TS->shaped_text_get_size(lines_rid[i]).y + line_spacing;
if (minsize.height > (get_size().height - style->get_minimum_size().height + line_spacing)) {
break;
}
}
if (minsize.height > 0) {
minsize.height -= line_spacing;