浏览代码

Merge pull request #3007 from neikeq/fix_line_edit

Fix LineEdit cursor
Rémi Verschelde 9 年之前
父节点
当前提交
c667bde183
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/line_edit.cpp

+ 1 - 1
scene/gui/line_edit.cpp

@@ -568,7 +568,7 @@ void LineEdit::set_cursor_at_pixel_pos(int p_x) {
 		
 		int char_w = 0;
 		if (font != NULL) {
-			int char_w = font->get_char_size(text[ofs]).width;
+			char_w = font->get_char_size(text[ofs]).width;
 		}
 		pixel_ofs+=char_w;