summaryrefslogtreecommitdiff
path: root/scene/2d/line_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/line_2d.cpp')
-rw-r--r--scene/2d/line_2d.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 3c457b7df0..0aadc84091 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -101,14 +101,14 @@ float Line2D::get_width() const {
void Line2D::set_curve(const Ref<Curve> &p_curve) {
// Cleanup previous connection if any
if (_curve.is_valid()) {
- _curve->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
}
_curve = p_curve;
// Connect to the curve so the line will update when it is changed
if (_curve.is_valid()) {
- _curve->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
+ _curve->connect_compat(CoreStringNames::get_singleton()->changed, this, "_curve_changed");
}
update();
@@ -171,14 +171,14 @@ void Line2D::set_gradient(const Ref<Gradient> &p_gradient) {
// Cleanup previous connection if any
if (_gradient.is_valid()) {
- _gradient->disconnect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
+ _gradient->disconnect_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
}
_gradient = p_gradient;
// Connect to the gradient so the line will update when the ColorRamp is changed
if (_gradient.is_valid()) {
- _gradient->connect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
+ _gradient->connect_compat(CoreStringNames::get_singleton()->changed, this, "_gradient_changed");
}
update();