Focus path field after seleting file browser on Attach script window
This commit is contained in:
parent
56a44ca03e
commit
ac411c9f48
1 changed files with 6 additions and 0 deletions
|
@ -331,6 +331,12 @@ void ScriptCreateDialog::_file_selected(const String &p_file) {
|
|||
} else {
|
||||
file_path->set_text(p);
|
||||
_path_changed(p);
|
||||
|
||||
String filename = p.get_file().get_basename();
|
||||
int select_start = p.find_last(filename);
|
||||
file_path->select(select_start, select_start + filename.length());
|
||||
file_path->set_cursor_position(select_start + filename.length());
|
||||
file_path->grab_focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue