summaryrefslogtreecommitdiffstats
path: root/editor/directory_create_dialog.cpp
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2023-12-24 13:59:32 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2023-12-25 19:14:04 +0800
commita42ead59da853cb4afb1dbfd77bdb16cdd90d266 (patch)
treef017f11f7026964e3ed8d24fb0b5240dda4571b4 /editor/directory_create_dialog.cpp
parent13a0d6e9b253654f5cc2a44f3d0b3cae10440443 (diff)
downloadredot-engine-a42ead59da853cb4afb1dbfd77bdb16cdd90d266.tar.gz
Improve EditorDirDialog
* Automatically selects the newly created directory * Automatically selects "res://" when nothing is selected * Fixes an error when overwrite/replace dialog appears * Changes "copy checkbox + action button" to "copy button + move button" * Double clicking a directory (un)collapses it instead of copy/move * Uses DirectoryCreateDialog for "Create Folder"
Diffstat (limited to 'editor/directory_create_dialog.cpp')
-rw-r--r--editor/directory_create_dialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/directory_create_dialog.cpp b/editor/directory_create_dialog.cpp
index 0efd11a6c1..aacd718fde 100644
--- a/editor/directory_create_dialog.cpp
+++ b/editor/directory_create_dialog.cpp
@@ -110,7 +110,7 @@ void DirectoryCreateDialog::ok_pressed() {
err = da->make_dir_recursive(path);
if (err == OK) {
- emit_signal(SNAME("dir_created"));
+ emit_signal(SNAME("dir_created"), base_dir.path_join(path));
} else {
EditorNode::get_singleton()->show_warning(TTR("Could not create folder."));
}
@@ -131,7 +131,7 @@ void DirectoryCreateDialog::config(const String &p_base_dir) {
}
void DirectoryCreateDialog::_bind_methods() {
- ADD_SIGNAL(MethodInfo("dir_created"));
+ ADD_SIGNAL(MethodInfo("dir_created", PropertyInfo(Variant::STRING, "path")));
}
DirectoryCreateDialog::DirectoryCreateDialog() {