summaryrefslogtreecommitdiff
path: root/tools/editor/dependency_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/dependency_editor.cpp')
-rw-r--r--tools/editor/dependency_editor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp
index a702d3c687..6ad7704815 100644
--- a/tools/editor/dependency_editor.cpp
+++ b/tools/editor/dependency_editor.cpp
@@ -399,6 +399,7 @@ void DependencyRemoveDialog::show(const Vector<String> &to_erase) {
_fill_owners(EditorFileSystem::get_singleton()->get_filesystem());
+
if (exist) {
owners->show();
text->set_text(TTR("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<String,TreeItem*>::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());
}