From 227a81c11952cbf20a03a998f7d223b07a517bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 21 Jan 2020 09:25:07 +0100 Subject: [PATCH] Range: Properly bind value emitted by 'changed' signal This was fixed in the `master` branch by removing the value in #29831, but for `3.1` we preserve compatibility, even if redundant with 'value_changed'. Fixes #35395. --- doc/classes/Range.xml | 2 ++ scene/gui/range.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index b91af146235..b8625a3f2da 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -60,6 +60,8 @@ + + Emitted when [member min_value], [member max_value], [member page], or [member step] change. diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index c24e62c8cb5..6fd9ab4cc49 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -266,7 +266,7 @@ void Range::_bind_methods() { ClassDB::bind_method(D_METHOD("unshare"), &Range::unshare); ADD_SIGNAL(MethodInfo("value_changed", PropertyInfo(Variant::REAL, "value"))); - ADD_SIGNAL(MethodInfo("changed")); + ADD_SIGNAL(MethodInfo("changed", PropertyInfo(Variant::REAL, "value"))); ADD_PROPERTY(PropertyInfo(Variant::REAL, "min_value"), "set_min", "get_min"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_value"), "set_max", "get_max");