Fix RichTextLabel alignment for clickable regions

Fixes #41006 (regression from #39164).

The original alignment fix was limited to PROCESS_DRAW mode, which
caused some discrepancies with PROCESS_POINTER mode.
Now only PROCESS_CACHE is excluded with a condition a few lines above.

(cherry picked from commit b783fa1416)
This commit is contained in:
PouleyKetchoupp 2020-09-11 08:14:26 +02:00 committed by Rémi Verschelde
parent d38eb29f2e
commit 819765130d
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
lh = line < l.height_caches.size() ? l.height_caches[line] : 1; \ lh = line < l.height_caches.size() ? l.height_caches[line] : 1; \
line_ascent = line < l.ascent_caches.size() ? l.ascent_caches[line] : 1; \ line_ascent = line < l.ascent_caches.size() ? l.ascent_caches[line] : 1; \
line_descent = line < l.descent_caches.size() ? l.descent_caches[line] : 1; \ line_descent = line < l.descent_caches.size() ? l.descent_caches[line] : 1; \
if ((p_mode == PROCESS_DRAW) && (align != ALIGN_FILL)) { \ if (align != ALIGN_FILL) { \
if (line < l.offset_caches.size()) { \ if (line < l.offset_caches.size()) { \
wofs = l.offset_caches[line]; \ wofs = l.offset_caches[line]; \
} \ } \