diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-07-30 11:25:28 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-07-30 13:34:37 +0100 |
commit | 9be7b30f3536057b22fd70d5367268749c1a7ea9 (patch) | |
tree | 7423283af3288fe5a5e0a39d8e8aff4778ebe0cb /modules/csg/csg_shape.cpp | |
parent | 35ff38b3d4336b757bce714477bf5ed61b0cd7f3 (diff) | |
download | redot-engine-9be7b30f3536057b22fd70d5367268749c1a7ea9.tar.gz |
Ensure CSG parent's _make_dirty() is called when entering a tree.
Diffstat (limited to 'modules/csg/csg_shape.cpp')
-rw-r--r-- | modules/csg/csg_shape.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index cea006364f..82a47f594b 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -132,18 +132,13 @@ void CSGShape3D::_make_dirty() { return; } - if (dirty) { - return; - } - - dirty = true; - if (parent) { parent->_make_dirty(); - } else { - //only parent will do + } else if (!dirty) { call_deferred("_update_shape"); } + + dirty = true; } CSGBrush *CSGShape3D::_get_brush() { |