mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #113510 from KoBeWi/slices_of_bug
Fix CreateDialog returning wrong type
This commit is contained in:
commit
216fdd1803
3 changed files with 3 additions and 3 deletions
|
|
@ -621,7 +621,7 @@ String CreateDialog::get_selected_type() {
|
||||||
return String();
|
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", ""));
|
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() {
|
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()) {
|
if (node_type_other->is_pressed()) {
|
||||||
validation_panel->update();
|
validation_panel->update();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -492,7 +492,7 @@ void ScriptCreateDialog::_file_selected(const String &p_file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptCreateDialog::_create() {
|
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());
|
_parent_name_changed(parent_name->get_text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue