mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fixed !is_inside_tree() errors in file dialog
Fixed !is_inside_tree() errors appearing when current_file has a . in it.
(cherry picked from commit 2b13938459)
This commit is contained in:
committed by
Rémi Verschelde
parent
7586957720
commit
7624e1009a
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user