Update scene/gui/rich_text_label.cpp

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
This commit is contained in:
Anas Saifi 2021-08-22 15:18:52 +05:30 committed by GitHub
parent b8bf2ec3cd
commit 9b06355488
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -449,9 +449,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
fh = line_ascent + line_descent;
if (end && c[end - 1] == ' ') {
if (p_mode == PROCESS_CACHE) {
spaces_size += font->get_char_size(' ').width;
} else if (align == ALIGN_FILL) {
if (align == ALIGN_FILL && p_mode != PROCESS_CACHE) {
int ln = MIN(l.offset_caches.size() - 1, line);
if (l.space_caches[ln]) {
align_ofs = spaces * l.offset_caches[ln] / l.space_caches[ln];