瀏覽代碼

Fix Label text length mismatch after localization

Haoyu Qiu 3 年之前
父節點
當前提交
2a921cc9f8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/label.cpp

+ 1 - 1
scene/gui/label.cpp

@@ -117,7 +117,7 @@ void Label::_shape() {
 		for (int i = 0; i < TextServer::SPACING_MAX; i++) {
 		for (int i = 0; i < TextServer::SPACING_MAX; i++) {
 			TS->shaped_text_set_spacing(text_rid, TextServer::SpacingType(i), font->get_spacing(TextServer::SpacingType(i)));
 			TS->shaped_text_set_spacing(text_rid, TextServer::SpacingType(i), font->get_spacing(TextServer::SpacingType(i)));
 		}
 		}
-		TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, text));
+		TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, txt));
 		dirty = false;
 		dirty = false;
 		font_dirty = false;
 		font_dirty = false;
 		lines_dirty = true;
 		lines_dirty = true;