From d9bf3e5e35a00dbd3edf6d0e287d22de1fcf87ec Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 29 Dec 2021 21:57:14 +0300 Subject: [PATCH] Fix return type for the exposed EditorResourcePicker method --- doc/classes/EditorResourcePicker.xml | 2 +- editor/editor_resource_picker.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml index fbca689adcb..719d438ec3a 100644 --- a/doc/classes/EditorResourcePicker.xml +++ b/doc/classes/EditorResourcePicker.xml @@ -40,7 +40,7 @@ - + This virtual method can be implemented to handle context menu items not handled by default. See [method set_create_options]. diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 647ec661ff1..d3e61f0e03c 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -687,7 +687,7 @@ void EditorResourcePicker::_bind_methods() { ClassDB::bind_method(D_METHOD("is_editable"), &EditorResourcePicker::is_editable); ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_create_options", PropertyInfo(Variant::OBJECT, "menu_node"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("handle_menu_selected", PropertyInfo(Variant::INT, "id"))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handle_menu_selected", PropertyInfo(Variant::INT, "id"))); ADD_PROPERTY(PropertyInfo(Variant::STRING, "base_type"), "set_base_type", "get_base_type"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "edited_resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource", 0), "set_edited_resource", "get_edited_resource");