summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Hermansson <mikael@hermansson.io>2023-11-13 15:44:32 +0100
committerMikael Hermansson <mikael@hermansson.io>2023-11-13 15:44:32 +0100
commit9fb0b52608ef01420a48bf92d77ce8a3da042ccc (patch)
tree9308c0b1b22be80a6d60f55475c2efab9edb1841
parent59457685c18e2d729eea50c751c11f049a7186f0 (diff)
downloadredot-engine-9fb0b52608ef01420a48bf92d77ce8a3da042ccc.tar.gz
Fix transform notification not getting sent out for RigidBody2D
-rw-r--r--scene/main/canvas_item.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 4ee81e5cb0..d2735b968b 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -891,22 +891,18 @@ void CanvasItem::_notify_transform(CanvasItem *p_node) {
* notification anyway).
*/
- if (/*p_node->xform_change.in_list() &&*/ p_node->_is_global_invalid()) {
+ if (p_node->block_transform_notify || p_node->_is_global_invalid()) {
return; //nothing to do
}
p_node->_set_global_invalid(true);
- if (p_node->notify_transform && !p_node->xform_change.in_list()) {
- if (!p_node->block_transform_notify) {
- if (p_node->is_inside_tree()) {
- if (is_accessible_from_caller_thread()) {
- get_tree()->xform_change_list.add(&p_node->xform_change);
- } else {
- // Should be rare, but still needs to be handled.
- MessageQueue::get_singleton()->push_callable(callable_mp(p_node, &CanvasItem::_notify_transform_deferred));
- }
- }
+ if (p_node->notify_transform && !p_node->xform_change.in_list() && p_node->is_inside_tree()) {
+ if (is_accessible_from_caller_thread()) {
+ get_tree()->xform_change_list.add(&p_node->xform_change);
+ } else {
+ // Should be rare, but still needs to be handled.
+ MessageQueue::get_singleton()->push_callable(callable_mp(p_node, &CanvasItem::_notify_transform_deferred));
}
}