mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 01:49:10 +03:00
Fix CreateDialog returning wrong type
This commit is contained in:
@@ -621,7 +621,7 @@ String CreateDialog::get_selected_type() {
|
||||
return String();
|
||||
}
|
||||
|
||||
String type = selected->get_text(0);
|
||||
String type = selected->get_text(0).get_slicec(' ', 0);
|
||||
return ClassDB::class_exists(type) ? type : String(selected->get_meta("_script_path", ""));
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ void SceneCreateDialog::browse_types() {
|
||||
}
|
||||
|
||||
void SceneCreateDialog::on_type_picked() {
|
||||
other_type_display->set_text(select_node_dialog->get_selected_type().get_slicec(' ', 0));
|
||||
other_type_display->set_text(select_node_dialog->get_selected_type());
|
||||
if (node_type_other->is_pressed()) {
|
||||
validation_panel->update();
|
||||
} else {
|
||||
|
||||
@@ -492,7 +492,7 @@ void ScriptCreateDialog::_file_selected(const String &p_file) {
|
||||
}
|
||||
|
||||
void ScriptCreateDialog::_create() {
|
||||
parent_name->set_text(select_class->get_selected_type().get_slicec(' ', 0));
|
||||
parent_name->set_text(select_class->get_selected_type());
|
||||
_parent_name_changed(parent_name->get_text());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user