mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-01 06:01:14 +00:00 
			
		
		
		
	Properly disambiguate unsaved scripts
This commit is contained in:
		
							parent
							
								
									be435608b0
								
							
						
					
					
						commit
						3082def404
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -1922,14 +1922,18 @@ void ScriptEditor::_update_script_names() { | |||
| 		Vector<String> disambiguated_script_names; | ||||
| 		Vector<String> full_script_paths; | ||||
| 		for (int j = 0; j < sedata.size(); j++) { | ||||
| 			disambiguated_script_names.append(sedata[j].name); | ||||
| 			disambiguated_script_names.append(sedata[j].name.replace("(*)", "")); | ||||
| 			full_script_paths.append(sedata[j].tooltip); | ||||
| 		} | ||||
| 
 | ||||
| 		EditorNode::disambiguate_filenames(full_script_paths, disambiguated_script_names); | ||||
| 
 | ||||
| 		for (int j = 0; j < sedata.size(); j++) { | ||||
| 			sedata.write[j].name = disambiguated_script_names[j]; | ||||
| 			if (sedata[j].name.ends_with("(*)")) { | ||||
| 				sedata.write[j].name = disambiguated_script_names[j] + "(*)"; | ||||
| 			} else { | ||||
| 				sedata.write[j].name = disambiguated_script_names[j]; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tomasz Chabora
						Tomasz Chabora