You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
committed by
Rémi Verschelde
parent
3f1bec5887
commit
f2e7a650c7
@@ -495,6 +495,12 @@ void DependencyRemoveDialog::ok_pressed() {
|
|||||||
Resource *res = ResourceCache::get(files_to_delete[i]);
|
Resource *res = ResourceCache::get(files_to_delete[i]);
|
||||||
res->set_path("");
|
res->set_path("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the file we are deleting is the main scene, clear its definition.
|
||||||
|
if (files_to_delete[i] == ProjectSettings::get_singleton()->get("application/run/main_scene")) {
|
||||||
|
ProjectSettings::get_singleton()->set("application/run/main_scene", "");
|
||||||
|
}
|
||||||
|
|
||||||
String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/");
|
String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/");
|
||||||
print_verbose("Moving to trash: " + path);
|
print_verbose("Moving to trash: " + path);
|
||||||
Error err = OS::get_singleton()->move_to_trash(path);
|
Error err = OS::get_singleton()->move_to_trash(path);
|
||||||
|
|||||||
Reference in New Issue
Block a user