Procházet zdrojové kódy

Merge pull request #15863 from touilleMan/fix-pluginscript-crash-in-dialog-box

Hide Script nodes in dialog box to prevent crash with pluginscript
Rémi Verschelde před 7 roky
rodič
revize
a15f60d212
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      editor/create_dialog.cpp

+ 3 - 0
editor/create_dialog.cpp

@@ -255,6 +255,9 @@ void CreateDialog::_update_search() {
 		if (base_type == "Node" && type.begins_with("Editor"))
 			continue; // do not show editor nodes
 
+		if (base_type == "Resource" && ClassDB::is_parent_class(type, "Script"))
+			continue; // do not show script nodes
+
 		if (!ClassDB::can_instance(type))
 			continue; // can't create what can't be instanced