Răsfoiți Sursa

Merge pull request #81007 from coumcashier/master

FileSystemDock: Don't update current path on rename when file list has focus
Rémi Verschelde 2 ani în urmă
părinte
comite
0d4fe74043
1 a modificat fișierele cu 5 adăugiri și 3 ștergeri
  1. 5 3
      editor/filesystem_dock.cpp

+ 5 - 3
editor/filesystem_dock.cpp

@@ -1789,11 +1789,13 @@ void FileSystemDock::_rename_operation_confirm() {
 
 
 	EditorSceneTabs::get_singleton()->set_current_tab(current_tab);
 	EditorSceneTabs::get_singleton()->set_current_tab(current_tab);
 
 
+	if (tree->has_focus()) {
+		current_path = new_path;
+		current_path_line_edit->set_text(current_path);
+	}
+
 	print_verbose("FileSystem: calling rescan.");
 	print_verbose("FileSystem: calling rescan.");
 	_rescan();
 	_rescan();
-
-	current_path = new_path;
-	current_path_line_edit->set_text(current_path);
 }
 }
 
 
 void FileSystemDock::_duplicate_operation_confirm() {
 void FileSystemDock::_duplicate_operation_confirm() {