Skip to content

Commit d3aa570

Browse files
committed
vformat
1 parent 208557f commit d3aa570

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

editor/create_dialog.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ void CreateDialog::_item_selected() {
556556

557557
const String brief_desc = item->get_tooltip(0);
558558
if (EditorHelp::get_doc_data()->class_list.has(name)) {
559-
help_bit->set_text(("[%s] %s", name, brief_desc));
559+
help_bit->set_text(vformat("[%s] %s", name, brief_desc));
560560
} else {
561561
help_bit->set_text(vformat("[url=%s]%s[/url]", brief_desc, name));
562562
}
@@ -568,9 +568,6 @@ void CreateDialog::_item_selected() {
568568

569569
void CreateDialog::_script_selected(const Variant &p_object, int p_column, int p_id) {
570570
TreeItem *p_item = Object::cast_to<TreeItem>(p_object);
571-
if (!p_item) {
572-
return;
573-
}
574571
String script_path = p_item->get_tooltip(0);
575572
if (!script_path.empty()) {
576573
Ref<Script> script = ResourceLoader::load(script_path, "Script");
@@ -579,8 +576,8 @@ void CreateDialog::_script_selected(const Variant &p_object, int p_column, int p
579576
} else {
580577
print_error("Failed to load script: " + script_path);
581578
}
579+
hide();
582580
}
583-
hide();
584581
}
585582

586583
void CreateDialog::_favorite_toggled() {

0 commit comments

Comments
 (0)