Browse Source

Update path in the FileSystem dock after doing file operations

(cherry picked from commit b3b455c167aa81ce0b583afea66f0118384cf6c9)
Michael Alexsander 4 years ago
parent
commit
6cc6dce9c1
1 changed files with 12 additions and 0 deletions
  1. 12 0
      editor/filesystem_dock.cpp

+ 12 - 0
editor/filesystem_dock.cpp

@@ -1293,10 +1293,16 @@ void FileSystemDock::_make_scene_confirm() {
 
 
 void FileSystemDock::_file_removed(String p_file) {
 void FileSystemDock::_file_removed(String p_file) {
 	emit_signal("file_removed", p_file);
 	emit_signal("file_removed", p_file);
+
+	path = "res://";
+	current_path->set_text(path);
 }
 }
 
 
 void FileSystemDock::_folder_removed(String p_folder) {
 void FileSystemDock::_folder_removed(String p_folder) {
 	emit_signal("folder_removed", p_folder);
 	emit_signal("folder_removed", p_folder);
+
+	path = "res://";
+	current_path->set_text(path);
 }
 }
 
 
 void FileSystemDock::_rename_operation_confirm() {
 void FileSystemDock::_rename_operation_confirm() {
@@ -1351,6 +1357,9 @@ void FileSystemDock::_rename_operation_confirm() {
 
 
 	print_verbose("FileSystem: saving moved scenes.");
 	print_verbose("FileSystem: saving moved scenes.");
 	_save_scenes_after_move(file_renames);
 	_save_scenes_after_move(file_renames);
+
+	path = new_path;
+	current_path->set_text(path);
 }
 }
 
 
 void FileSystemDock::_duplicate_operation_confirm() {
 void FileSystemDock::_duplicate_operation_confirm() {
@@ -1459,6 +1468,9 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool overw
 
 
 		print_verbose("FileSystem: saving moved scenes.");
 		print_verbose("FileSystem: saving moved scenes.");
 		_save_scenes_after_move(file_renames);
 		_save_scenes_after_move(file_renames);
+
+		path = "res://";
+		current_path->set_text(path);
 	}
 	}
 }
 }