Browse Source

Fix wrong Curve connection

kobewi 2 years ago
parent
commit
a076792a3c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      editor/plugins/curve_editor_plugin.cpp

+ 2 - 2
editor/plugins/curve_editor_plugin.cpp

@@ -62,14 +62,14 @@ void CurveEdit::set_curve(Ref<Curve> p_curve) {
 
 
 	if (curve.is_valid()) {
 	if (curve.is_valid()) {
 		curve->disconnect_changed(callable_mp(this, &CurveEdit::_curve_changed));
 		curve->disconnect_changed(callable_mp(this, &CurveEdit::_curve_changed));
-		curve->disconnect_changed(callable_mp(this, &CurveEdit::_curve_changed));
+		curve->disconnect(Curve::SIGNAL_RANGE_CHANGED, callable_mp(this, &CurveEdit::_curve_changed));
 	}
 	}
 
 
 	curve = p_curve;
 	curve = p_curve;
 
 
 	if (curve.is_valid()) {
 	if (curve.is_valid()) {
 		curve->connect_changed(callable_mp(this, &CurveEdit::_curve_changed));
 		curve->connect_changed(callable_mp(this, &CurveEdit::_curve_changed));
-		curve->connect_changed(callable_mp(this, &CurveEdit::_curve_changed));
+		curve->connect(Curve::SIGNAL_RANGE_CHANGED, callable_mp(this, &CurveEdit::_curve_changed));
 	}
 	}
 
 
 	// Note: if you edit a curve, then set another, and try to undo,
 	// Note: if you edit a curve, then set another, and try to undo,