diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-01 14:24:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 14:24:35 +0100 |
commit | f1bff648f25746dc6d41d7101fd56f4464985805 (patch) | |
tree | 87f7c10c50a75d477c0eb0a054bdf14e7c44c2fe /editor | |
parent | 6914a58f99ae0f7aaaa785706d7184c8d6cea373 (diff) | |
parent | 7072b359b40f57e178e87b386acef5a6928e61fe (diff) |
Merge pull request #57355 from akien-mga/method-bindings-clearer-types
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/editor_plugin.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 29f6079fcf..a1c031aa1b 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -513,11 +513,9 @@ void EditorPlugin::add_tool_menu_item(const String &p_name, const Callable &p_ca EditorNode::get_singleton()->add_tool_menu_item(p_name, p_callable); } -void EditorPlugin::add_tool_submenu_item(const String &p_name, Object *p_submenu) { +void EditorPlugin::add_tool_submenu_item(const String &p_name, PopupMenu *p_submenu) { ERR_FAIL_NULL(p_submenu); - PopupMenu *submenu = Object::cast_to<PopupMenu>(p_submenu); - ERR_FAIL_NULL(submenu); - EditorNode::get_singleton()->add_tool_submenu_item(p_name, submenu); + EditorNode::get_singleton()->add_tool_submenu_item(p_name, p_submenu); } void EditorPlugin::remove_tool_menu_item(const String &p_name) { diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index faa8ae1ce6..06517190f6 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -42,6 +42,7 @@ #include "scene/3d/camera_3d.h" #include "scene/main/node.h" #include "scene/resources/texture.h" + class EditorNode; class Node3D; class Camera3D; @@ -217,7 +218,7 @@ public: void remove_control_from_bottom_panel(Control *p_control); void add_tool_menu_item(const String &p_name, const Callable &p_callable); - void add_tool_submenu_item(const String &p_name, Object *p_submenu); + void add_tool_submenu_item(const String &p_name, PopupMenu *p_submenu); void remove_tool_menu_item(const String &p_name); void set_input_event_forwarding_always_enabled(); |