Merge pull request #30695 from YeldhamDev/big_text_focus

Make multiline text edit grab focus when popping up
This commit is contained in:
Rémi Verschelde 2019-07-19 23:01:38 +02:00 committed by GitHub
commit e44041ae41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,12 +112,13 @@ void EditorPropertyMultilineText::_open_big_text() {
big_text->set_wrap_enabled(true); big_text->set_wrap_enabled(true);
big_text_dialog = memnew(AcceptDialog); big_text_dialog = memnew(AcceptDialog);
big_text_dialog->add_child(big_text); big_text_dialog->add_child(big_text);
big_text_dialog->set_title("Edit Text:"); big_text_dialog->set_title(TTR("Edit Text:"));
add_child(big_text_dialog); add_child(big_text_dialog);
} }
big_text_dialog->popup_centered_ratio(); big_text_dialog->popup_centered_ratio();
big_text->set_text(text->get_text()); big_text->set_text(text->get_text());
big_text->grab_focus();
} }
void EditorPropertyMultilineText::update_property() { void EditorPropertyMultilineText::update_property() {