diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-28 17:19:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 17:19:08 +0100 |
commit | 324e5a60dd068cbbff9c433802f8ecb78cff3364 (patch) | |
tree | 41edf077bcafa3c959a417aa4700318d483ff680 /scene/gui/container.cpp | |
parent | a439131c2b06b3d452e5be13530b6d2caa72c1aa (diff) | |
parent | 32ccf306f9a820e2ac5811de7c12e99a736fdf05 (diff) |
Merge pull request #36426 from akien-mga/calling-all-stations
Signals: Port connect calls to use callable_mp
Diffstat (limited to 'scene/gui/container.cpp')
-rw-r--r-- | scene/gui/container.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index f6ce0c9a60..41f33bb719 100644 --- a/scene/gui/container.cpp +++ b/scene/gui/container.cpp @@ -48,9 +48,9 @@ void Container::add_child_notify(Node *p_child) { if (!control) return; - control->connect_compat("size_flags_changed", this, "queue_sort"); - control->connect_compat("minimum_size_changed", this, "_child_minsize_changed"); - control->connect_compat("visibility_changed", this, "_child_minsize_changed"); + control->connect("size_flags_changed", callable_mp(this, &Container::queue_sort)); + control->connect("minimum_size_changed", callable_mp(this, &Container::_child_minsize_changed)); + control->connect("visibility_changed", callable_mp(this, &Container::_child_minsize_changed)); minimum_size_changed(); queue_sort(); @@ -75,9 +75,9 @@ void Container::remove_child_notify(Node *p_child) { if (!control) return; - control->disconnect_compat("size_flags_changed", this, "queue_sort"); - control->disconnect_compat("minimum_size_changed", this, "_child_minsize_changed"); - control->disconnect_compat("visibility_changed", this, "_child_minsize_changed"); + control->disconnect("size_flags_changed", callable_mp(this, &Container::queue_sort)); + control->disconnect("minimum_size_changed", callable_mp(this, &Container::_child_minsize_changed)); + control->disconnect("visibility_changed", callable_mp(this, &Container::_child_minsize_changed)); minimum_size_changed(); queue_sort(); @@ -185,7 +185,6 @@ String Container::get_configuration_warning() const { void Container::_bind_methods() { ClassDB::bind_method(D_METHOD("_sort_children"), &Container::_sort_children); - ClassDB::bind_method(D_METHOD("_child_minsize_changed"), &Container::_child_minsize_changed); ClassDB::bind_method(D_METHOD("queue_sort"), &Container::queue_sort); ClassDB::bind_method(D_METHOD("fit_child_in_rect", "child", "rect"), &Container::fit_child_in_rect); |