Merge pull request #40880 from madmiraal/fix-csg-make_dirty

Ensure CSG parent's _make_dirty() is called when entering a tree.
This commit is contained in:
Rémi Verschelde 2020-07-30 15:19:42 +02:00 committed by GitHub
commit b64bdf2c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 9 deletions

View File

@ -132,18 +132,13 @@ void CSGShape3D::_make_dirty() {
return; return;
} }
if (dirty) { if (parent) {
return; parent->_make_dirty();
} else if (!dirty) {
call_deferred("_update_shape");
} }
dirty = true; dirty = true;
if (parent) {
parent->_make_dirty();
} else {
//only parent will do
call_deferred("_update_shape");
}
} }
CSGBrush *CSGShape3D::_get_brush() { CSGBrush *CSGShape3D::_get_brush() {