LineEdit: fix placeholder text affected by secret

This commit is contained in:
Poommetee Ketson 2017-05-03 16:55:37 +07:00
parent f527a69462
commit e64c473bc9

View file

@ -633,8 +633,8 @@ void LineEdit::_notification(int p_what) {
if (char_ofs >= t.length())
break;
CharType cchar = pass ? '*' : t[char_ofs];
CharType next = pass ? '*' : t[char_ofs + 1];
CharType cchar = (pass && !text.empty()) ? '*' : t[char_ofs];
CharType next = (pass && !text.empty()) ? '*' : t[char_ofs + 1];
int char_width = font->get_char_size(cchar, next).width;
// end of widget, break!