diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-30 15:19:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 15:19:42 +0200 |
commit | b64bdf2c3e01f163d5295461007ecd14686f3fcb (patch) | |
tree | 4230634fcc3f2e31da5ff7c63c38e078ba874cb4 /modules/csg/csg_shape.cpp | |
parent | 49be94ec39860da07196f1be95bd88843b827d4b (diff) | |
parent | 9be7b30f3536057b22fd70d5367268749c1a7ea9 (diff) |
Merge pull request #40880 from madmiraal/fix-csg-make_dirty
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() { |