Unverified Commit ef1e2df8 by Rémi Verschelde Committed by GitHub

Merge pull request #14645 from volzhs/focus-after-select

Focus path field after seleting file browser on Attach script window
parents 76af59ee ac411c9f
......@@ -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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment