@@ -1698,7 +1698,6 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
16981698 val = CLAMP (val, -1'000'000 , 1'000'000 );
16991699
17001700 emit_changed (get_edited_property (), val);
1701- easing_draw->queue_redraw ();
17021701 }
17031702}
17041703
@@ -1750,14 +1749,16 @@ void EditorPropertyEasing::_draw_easing() {
17501749}
17511750
17521751void EditorPropertyEasing::update_property () {
1752+ float val = get_edited_property_value ();
1753+ spin->set_value_no_signal (val);
1754+
17531755 easing_draw->queue_redraw ();
17541756}
17551757
17561758void EditorPropertyEasing::_set_preset (int p_preset) {
17571759 static const float preset_value[EASING_MAX] = { 0.0 , 1.0 , 2.0 , 0.5 , -2.0 , -0.5 };
17581760
17591761 emit_changed (get_edited_property (), preset_value[p_preset]);
1760- easing_draw->queue_redraw ();
17611762}
17621763
17631764void EditorPropertyEasing::_setup_spin () {
@@ -1767,12 +1768,6 @@ void EditorPropertyEasing::_setup_spin() {
17671768}
17681769
17691770void EditorPropertyEasing::_spin_value_changed (double p_value) {
1770- // 0 is a singularity, but both positive and negative values
1771- // are otherwise allowed. Enforce 0+ as workaround.
1772- if (Math::is_zero_approx (p_value)) {
1773- p_value = 0.00001 ;
1774- }
1775-
17761771 // Limit to a reasonable value to prevent the curve going into infinity,
17771772 // which can cause crashes and other issues.
17781773 p_value = CLAMP (p_value, -1'000'000 , 1'000'000 );
0 commit comments