浏览代码

[TextEdit] Fix IME intermediate text not displayed when TextEdit is empty and placeholder is set.

bruvzg 2 年之前
父节点
当前提交
a56fdea289
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -680,7 +680,7 @@ void TextEdit::_notification(int p_what) {
 				}
 			}
 
-			bool draw_placeholder = text.size() == 1 && text[0].length() == 0;
+			bool draw_placeholder = text.size() == 1 && text[0].is_empty() && ime_text.is_empty();
 
 			// Get the highlighted words.
 			String highlighted_text = get_selected_text(0);