Merge pull request #21152 from DualMatrix/fileselect_error

Fixed !is_inside_tree() errors in file dialog
This commit is contained in:
Rémi Verschelde 2018-08-22 14:27:17 +02:00 committed by GitHub
commit 8b25c0513f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -582,7 +582,8 @@ void FileDialog::set_current_file(const String &p_file) {
int lp = p_file.find_last(".");
if (lp != -1) {
file->select(0, lp);
file->grab_focus();
if (file->is_inside_tree())
file->grab_focus();
}
}
void FileDialog::set_current_path(const String &p_path) {