Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reimport by scan parsing dependency paths incorrectly #93765

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,9 @@ bool EditorFileSystem::_update_scan_actions() {
//must reimport
reimports.push_back(full_path);
Vector<String> dependencies = _get_dependencies(full_path);
for (const String &dependency_path : dependencies) {
if (import_extensions.has(dependency_path.get_extension())) {
for (const String &dep : dependencies) {
const String &dependency_path = dep.contains("::") ? dep.get_slice("::", 0) : dep;
KoBeWi marked this conversation as resolved.
Show resolved Hide resolved
if (import_extensions.has(dep.get_extension())) {
reimports.push_back(dependency_path);
}
}
Expand Down Expand Up @@ -1748,7 +1749,8 @@ String EditorFileSystem::_get_global_script_class(const String &p_type, const St
void EditorFileSystem::_update_file_icon_path(EditorFileSystemDirectory::FileInfo *file_info) {
String icon_path;
if (file_info->script_class_icon_path.is_empty() && !file_info->deps.is_empty()) {
const String &script_path = file_info->deps[0]; // Assuming the first dependency is a script.
const String &script_dep = file_info->deps[0]; // Assuming the first dependency is a script.
const String &script_path = script_dep.contains("::") ? script_dep.get_slice("::", 2) : script_dep;
KoBeWi marked this conversation as resolved.
Show resolved Hide resolved
if (!script_path.is_empty()) {
String *cached = file_icon_cache.getptr(script_path);
if (cached) {
Expand Down
Loading