Merge pull request #71411 from Paulb23/new-textfile-global-path
Globalise path for New TextFile in FileSystemDock
This commit is contained in:
commit
4f631dc1b0
2 changed files with 4 additions and 3 deletions
|
@ -2051,7 +2051,8 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
|
||||||
if (!fpath.ends_with("/")) {
|
if (!fpath.ends_with("/")) {
|
||||||
fpath = fpath.get_base_dir();
|
fpath = fpath.get_base_dir();
|
||||||
}
|
}
|
||||||
ScriptEditor::get_singleton()->open_text_file_create_dialog(fpath);
|
String dir = ProjectSettings::get_singleton()->globalize_path(fpath);
|
||||||
|
ScriptEditor::get_singleton()->open_text_file_create_dialog(dir);
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2553,9 +2553,9 @@ void ScriptEditor::open_script_create_dialog(const String &p_base_name, const St
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEditor::open_text_file_create_dialog(const String &p_base_path, const String &p_base_name) {
|
void ScriptEditor::open_text_file_create_dialog(const String &p_base_path, const String &p_base_name) {
|
||||||
file_dialog->set_current_file(p_base_name);
|
|
||||||
file_dialog->set_current_dir(p_base_path);
|
|
||||||
_menu_option(FILE_NEW_TEXTFILE);
|
_menu_option(FILE_NEW_TEXTFILE);
|
||||||
|
file_dialog->set_current_dir(p_base_path);
|
||||||
|
file_dialog->set_current_file(p_base_name);
|
||||||
open_textfile_after_create = false;
|
open_textfile_after_create = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue