diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-19 16:27:19 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-20 08:24:50 +0100 |
commit | 69c95f4b4c128a22777af1e155bc24c7033decca (patch) | |
tree | 0add52fc270f808b4b2ad0bf7c970d72338c667e /modules/csg/csg_shape.cpp | |
parent | 1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff) |
Reworked signal connection system, added support for Callable and Signal objects and made them default.
Diffstat (limited to 'modules/csg/csg_shape.cpp')
-rw-r--r-- | modules/csg/csg_shape.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index e0c0aa6a51..7e7f383ea6 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -898,12 +898,12 @@ void CSGMesh::set_mesh(const Ref<Mesh> &p_mesh) { if (mesh == p_mesh) return; if (mesh.is_valid()) { - mesh->disconnect("changed", this, "_mesh_changed"); + mesh->disconnect_compat("changed", this, "_mesh_changed"); } mesh = p_mesh; if (mesh.is_valid()) { - mesh->connect("changed", this, "_mesh_changed"); + mesh->connect_compat("changed", this, "_mesh_changed"); } _make_dirty(); @@ -1812,15 +1812,15 @@ CSGBrush *CSGPolygon::_build_brush() { if (path != path_cache) { if (path_cache) { - path_cache->disconnect("tree_exited", this, "_path_exited"); - path_cache->disconnect("curve_changed", this, "_path_changed"); + path_cache->disconnect_compat("tree_exited", this, "_path_exited"); + path_cache->disconnect_compat("curve_changed", this, "_path_changed"); path_cache = NULL; } path_cache = path; - path_cache->connect("tree_exited", this, "_path_exited"); - path_cache->connect("curve_changed", this, "_path_changed"); + path_cache->connect_compat("tree_exited", this, "_path_exited"); + path_cache->connect_compat("curve_changed", this, "_path_changed"); path_cache = NULL; } curve = path->get_curve(); @@ -2236,8 +2236,8 @@ CSGBrush *CSGPolygon::_build_brush() { void CSGPolygon::_notification(int p_what) { if (p_what == NOTIFICATION_EXIT_TREE) { if (path_cache) { - path_cache->disconnect("tree_exited", this, "_path_exited"); - path_cache->disconnect("curve_changed", this, "_path_changed"); + path_cache->disconnect_compat("tree_exited", this, "_path_exited"); + path_cache->disconnect_compat("curve_changed", this, "_path_changed"); path_cache = NULL; } } |