summaryrefslogtreecommitdiffstats
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 07094dc3b5..9e11ffa242 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1881,10 +1881,6 @@ Vector<String> FileSystemDock::_check_existing() {
return conflicting_items;
}
-void FileSystemDock::_move_dialog_confirm(const String &p_path) {
- _move_operation_confirm(p_path, move_dialog->is_copy_pressed());
-}
-
void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_copy, Overwrite p_overwrite) {
if (p_overwrite == OVERWRITE_UNDECIDED) {
to_move_path = p_to_path;
@@ -2361,6 +2357,7 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
}
if (to_move.size() > 0) {
+ move_dialog->config(p_selected);
move_dialog->popup_centered_ratio(0.4);
}
} break;
@@ -3855,7 +3852,8 @@ FileSystemDock::FileSystemDock() {
move_dialog = memnew(EditorDirDialog);
add_child(move_dialog);
- move_dialog->connect("dir_selected", callable_mp(this, &FileSystemDock::_move_dialog_confirm));
+ move_dialog->connect("move_pressed", callable_mp(this, &FileSystemDock::_move_operation_confirm).bind(false, OVERWRITE_UNDECIDED));
+ move_dialog->connect("copy_pressed", callable_mp(this, &FileSystemDock::_move_operation_confirm).bind(true, OVERWRITE_UNDECIDED));
overwrite_dialog = memnew(ConfirmationDialog);
add_child(overwrite_dialog);
@@ -3892,7 +3890,7 @@ FileSystemDock::FileSystemDock() {
make_dir_dialog = memnew(DirectoryCreateDialog);
add_child(make_dir_dialog);
- make_dir_dialog->connect("dir_created", callable_mp(this, &FileSystemDock::_rescan));
+ make_dir_dialog->connect("dir_created", callable_mp(this, &FileSystemDock::_rescan).unbind(1));
make_scene_dialog = memnew(SceneCreateDialog);
add_child(make_scene_dialog);