From 1a04917fea6a769dbd540801daba5bab2b7b53ce Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Fri, 11 Aug 2017 13:34:06 +0200 Subject: [PATCH 1/2] Fixes ItemList::is_same_column_width() return type --- scene/gui/item_list.cpp | 2 +- scene/gui/item_list.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 484051f5467..b08b608db54 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -339,7 +339,7 @@ void ItemList::set_same_column_width(bool p_enable) { update(); shape_changed = true; } -int ItemList::is_same_column_width() const { +bool ItemList::is_same_column_width() const { return same_column_width; } diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h index 137eff88855..dcffe4bce79 100644 --- a/scene/gui/item_list.h +++ b/scene/gui/item_list.h @@ -169,7 +169,7 @@ public: int get_fixed_column_width() const; void set_same_column_width(bool p_enable); - int is_same_column_width() const; + bool is_same_column_width() const; void set_max_text_lines(int p_amount); int get_max_text_lines() const; From bffe4abb4dd42e919c7f5fc719beaaa4f7765f20 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Fri, 11 Aug 2017 13:35:38 +0200 Subject: [PATCH 2/2] EditorPlugin: Renames virtual method hiding inherited method --- editor/editor_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 19c77ef737f..d8c8d419b9a 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -249,8 +249,8 @@ bool EditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Refhas_method("get_name")) { - return get_script_instance()->call("get_name"); + if (get_script_instance() && get_script_instance()->has_method("get_plugin_name")) { + return get_script_instance()->call("get_plugin_name"); } return String(); @@ -450,7 +450,7 @@ void EditorPlugin::_bind_methods() { gizmo.return_val.hint = PROPERTY_HINT_RESOURCE_TYPE; gizmo.return_val.hint_string = "EditorSpatialGizmo"; ClassDB::add_virtual_method(get_class_static(), gizmo); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_name")); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_plugin_name")); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "has_main_screen")); ClassDB::add_virtual_method(get_class_static(), MethodInfo("make_visible", PropertyInfo(Variant::BOOL, "visible"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo("edit", PropertyInfo(Variant::OBJECT, "object")));