瀏覽代碼

Fix regression through fa98637acaab9135568bf0d43a65c9c96b59c32d

poke1024 7 年之前
父節點
當前提交
89f607604e
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      scene/gui/rich_text_label.cpp

+ 5 - 0
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);
 					ENSURE_WIDTH(w);
 
 
+					if (p_mode == PROCESS_CACHE) {
+						line_ascent = ascent;
+						line_descent = descent;
+					}
+
 					if (end && c[end - 1] == ' ') {
 					if (end && c[end - 1] == ' ') {
 						if (p_mode == PROCESS_CACHE) {
 						if (p_mode == PROCESS_CACHE) {
 							spaces_size += font->get_char_size(' ').width;
 							spaces_size += font->get_char_size(' ').width;