From 09a6a2d8f83473b4893b4dd04ff31972e267d5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 27 Feb 2020 22:49:16 +0100 Subject: Signals: Port more uses of connect_compat Those were problematic as they call a method of their parent class, but callable_mp does not allow that unless it's public. To solve it, we declare a local class that calls the parent class' method, which now needs to be protected to be accessible in the derived class. --- modules/visual_script/visual_script_property_selector.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/visual_script/visual_script_property_selector.cpp') diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index f8b8a9f00b..a2baacb619 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -518,6 +518,10 @@ void VisualScriptPropertySelector::_item_selected() { help_bit->set_text(text); } +void VisualScriptPropertySelector::_hide_requested() { + _closed(); // From WindowDialog. +} + void VisualScriptPropertySelector::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { @@ -716,7 +720,7 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() { seq_connect = false; help_bit = memnew(EditorHelpBit); vbc->add_margin_child(TTR("Description:"), help_bit); - help_bit->connect_compat("request_hide", this, "_closed"); + help_bit->connect("request_hide", callable_mp(this, &VisualScriptPropertySelector::_hide_requested)); search_options->set_columns(3); search_options->set_column_expand(1, false); search_options->set_column_expand(2, false); -- cgit v1.2.3