summaryrefslogtreecommitdiff
path: root/editor/dependency_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/dependency_editor.cpp')
-rw-r--r--editor/dependency_editor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 74f574ce1c..aa9125915c 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -506,6 +506,8 @@ void DependencyRemoveDialog::ok_pressed() {
Error err = OS::get_singleton()->move_to_trash(path);
if (err != OK) {
EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + files_to_delete[i] + "\n");
+ } else {
+ emit_signal("file_removed", files_to_delete[i]);
}
}
@@ -521,6 +523,8 @@ void DependencyRemoveDialog::ok_pressed() {
Error err = OS::get_singleton()->move_to_trash(path);
if (err != OK) {
EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + dirs_to_delete[i] + "\n");
+ } else {
+ emit_signal("folder_removed", dirs_to_delete[i]);
}
}
@@ -546,6 +550,11 @@ void DependencyRemoveDialog::ok_pressed() {
}
}
+void DependencyRemoveDialog::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("file_removed", PropertyInfo(Variant::STRING, "file")));
+ ADD_SIGNAL(MethodInfo("folder_removed", PropertyInfo(Variant::STRING, "folder")));
+}
+
DependencyRemoveDialog::DependencyRemoveDialog() {
VBoxContainer *vb = memnew(VBoxContainer);