Bladeren bron

Fix Updating New Node Dialog Description of Custom Nodes

The text of the first column in the selection Tree is used to compare
Node names.
Since this text contains additionally the path to the file, it doesn't
match anything.

This patch separates the path and puts it into the cell as suffix.
Markus Sauermann 2 jaren geleden
bovenliggende
commit
6a3df02956
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      editor/create_dialog.cpp

+ 2 - 1
editor/create_dialog.cpp

@@ -275,7 +275,8 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String
 		r_item->set_text(0, "\"" + p_type + "\"");
 		r_item->set_text(0, "\"" + p_type + "\"");
 	} else if (script_type) {
 	} else if (script_type) {
 		r_item->set_metadata(0, p_type);
 		r_item->set_metadata(0, p_type);
-		r_item->set_text(0, p_type + " (" + ScriptServer::get_global_class_path(p_type).get_file() + ")");
+		r_item->set_text(0, p_type);
+		r_item->set_suffix(0, "(" + ScriptServer::get_global_class_path(p_type).get_file() + ")");
 	} else {
 	} else {
 		r_item->set_metadata(0, custom_type_parents[p_type]);
 		r_item->set_metadata(0, custom_type_parents[p_type]);
 		r_item->set_text(0, p_type);
 		r_item->set_text(0, p_type);