diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-22 14:50:06 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-22 14:50:06 +0100 |
commit | d8014e9fabb8f8188ef79101142fd454df3ff6cd (patch) | |
tree | 58a19b23e7d0bd3258735c16a5c93637b6418f99 | |
parent | 47f7c250c0bf81c21ad551580637dee761b09e0a (diff) | |
parent | ceee405cec171506dde7bc62033dc52ac3797599 (diff) |
Merge pull request #73736 from helviett/fix_visible_lines_calculation
Fix visible_lines calculation
-rw-r--r-- | scene/gui/label.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index b861d7af01..81426158a2 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -209,10 +209,7 @@ bool Label::_shape() { // Fill after min_size calculation. - int visible_lines = lines_rid.size(); - if (max_lines_visible >= 0 && visible_lines > max_lines_visible) { - visible_lines = max_lines_visible; - } + int visible_lines = get_visible_line_count(); if (autowrap_mode != TextServer::AUTOWRAP_OFF) { bool lines_hidden = visible_lines > 0 && visible_lines < lines_rid.size(); if (lines_hidden) { |