diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp index 7e63cfb1b44..b69fed0bbf2 100644 --- a/tools/editor/dependency_editor.cpp +++ b/tools/editor/dependency_editor.cpp @@ -399,6 +399,7 @@ void DependencyRemoveDialog::show(const Vector &to_erase) { _fill_owners(EditorFileSystem::get_singleton()->get_filesystem()); + if (exist) { owners->show(); text->set_text("The files being removed are required by other resources in order for them to work.\nRemove them anyway? (no undo)"); @@ -417,6 +418,10 @@ void DependencyRemoveDialog::ok_pressed() { DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); for (Map::Element *E=files.front();E;E=E->next()) { + if (ResourceCache::has(E->key())) { + Resource *res = ResourceCache::get(E->key()); + res->set_path(""); //clear reference to path + } da->remove(E->key()); EditorFileSystem::get_singleton()->update_file(E->key()); } diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp index e2b17f5e640..881efd22bf4 100644 --- a/tools/editor/scenes_dock.cpp +++ b/tools/editor/scenes_dock.cpp @@ -915,6 +915,7 @@ void ScenesDock::_file_option(int p_option) { if (path.ends_with("/") || !files->is_selected(i)) continue; torem.push_back(path); + } if (torem.empty()) {