diff --git a/editor/gui/create_dialog.cpp b/editor/gui/create_dialog.cpp index ddacac2a1a9..3de6d6d00ef 100644 --- a/editor/gui/create_dialog.cpp +++ b/editor/gui/create_dialog.cpp @@ -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", "")); } diff --git a/editor/scene/scene_create_dialog.cpp b/editor/scene/scene_create_dialog.cpp index 56c00ac9584..c472e450855 100644 --- a/editor/scene/scene_create_dialog.cpp +++ b/editor/scene/scene_create_dialog.cpp @@ -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 { diff --git a/editor/script/script_create_dialog.cpp b/editor/script/script_create_dialog.cpp index 35db60a1208..41f804580e7 100644 --- a/editor/script/script_create_dialog.cpp +++ b/editor/script/script_create_dialog.cpp @@ -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()); }