summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-16 08:49:26 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-16 08:49:26 -0300
commit0b1e93ccd43815d93de031b4f23fbfcd9ae7a34c (patch)
treed0d09cf6c744eb61438ed6ce775eafed22f5b4a1 /core
parent26d33d1c6eedf9271bac20a24ea37453c21ef890 (diff)
-Make sure monitorable cant be flipped while flushing queries, fixes #17330
-Also added set_deferred, this was missing.
Diffstat (limited to 'core')
-rw-r--r--core/object.cpp6
-rw-r--r--core/object.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 6a6749f3b8..1eff56f026 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1715,6 +1715,8 @@ void Object::_bind_methods() {
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_deferred", &Object::_call_deferred_bind, mi);
}
+ ClassDB::bind_method(D_METHOD("set_deferred", "property", "value"), &Object::set_deferred);
+
ClassDB::bind_method(D_METHOD("callv", "method", "arg_array"), &Object::callv);
ClassDB::bind_method(D_METHOD("has_method", "method"), &Object::has_method);
@@ -1771,6 +1773,10 @@ void Object::call_deferred(const StringName &p_method, VARIANT_ARG_DECLARE) {
MessageQueue::get_singleton()->push_call(this, p_method, VARIANT_ARG_PASS);
}
+void Object::set_deferred(const StringName &p_property, const Variant &p_value) {
+ MessageQueue::get_singleton()->push_set(this, p_property, p_value);
+}
+
void Object::set_block_signals(bool p_block) {
_block_signals = p_block;
diff --git a/core/object.h b/core/object.h
index 25d41140aa..88a98dacbe 100644
--- a/core/object.h
+++ b/core/object.h
@@ -698,6 +698,7 @@ public:
bool is_connected(const StringName &p_signal, Object *p_to_object, const StringName &p_to_method) const;
void call_deferred(const StringName &p_method, VARIANT_ARG_LIST);
+ void set_deferred(const StringName &p_property, const Variant &p_value);
void set_block_signals(bool p_block);
bool is_blocking_signals() const;