Merge pull request #30695 from YeldhamDev/big_text_focus
Make multiline text edit grab focus when popping up
This commit is contained in:
commit
e44041ae41
1 changed files with 2 additions and 1 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue