aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpoke10242018-03-01 18:03:53 +0100
committerHein-Pieter van Braam2018-03-01 19:19:29 +0100
commitc800653c6f4a4d8643ef8f0198a628e793e27eed (patch)
tree0af22068b9be843ede2571064dcd4c4713901082
parent3e931e258cf5645c65a4d77c29884796093c6306 (diff)
downloadgodot-c800653c6f4a4d8643ef8f0198a628e793e27eed.tar.gz
godot-c800653c6f4a4d8643ef8f0198a628e793e27eed.tar.zst
godot-c800653c6f4a4d8643ef8f0198a628e793e27eed.zip
Fix regression through fa98637acaab9135568bf0d43a65c9c96b59c32d
(cherry picked from commit 89f607604e82bdce974a45029666c10586c6fe2a)
-rw-r--r--scene/gui/rich_text_label.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 381c6c75a..a92c3c326 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -319,6 +319,11 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
ENSURE_WIDTH(w);
+ if (p_mode == PROCESS_CACHE) {
+ line_ascent = ascent;
+ line_descent = descent;
+ }
+
if (end && c[end - 1] == ' ') {
if (p_mode == PROCESS_CACHE) {
spaces_size += font->get_char_size(' ').width;