File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,11 @@ void EditorPropertyText::_text_changed(const String &p_string) {
177177
178178 // Set tooltip so that the full text is displayed in a tooltip if hovered.
179179 // This is useful when using a narrow inspector, as the text can be trimmed otherwise.
180- text->set_tooltip_text (get_tooltip_string (text->get_text ()));
180+ if (text->is_secret ()) {
181+ text->set_tooltip_text (get_tooltip_string (text->get_placeholder ()));
182+ } else {
183+ text->set_tooltip_text (get_tooltip_string (text->get_text ()));
184+ }
181185
182186 if (string_name) {
183187 emit_changed (get_edited_property (), StringName (p_string));
@@ -192,7 +196,11 @@ void EditorPropertyText::update_property() {
192196 if (text->get_text () != s) {
193197 int caret = text->get_caret_column ();
194198 text->set_text (s);
195- text->set_tooltip_text (get_tooltip_string (s));
199+ if (text->is_secret ()) {
200+ text->set_tooltip_text (get_tooltip_string (text->get_placeholder ()));
201+ } else {
202+ text->set_tooltip_text (get_tooltip_string (s));
203+ }
196204 text->set_caret_column (caret);
197205 }
198206 text->set_editable (!is_read_only ());
You can’t perform that action at this time.
0 commit comments