Ensure CSG parent's _make_dirty() is called when entering a tree.

(cherry picked from commit 9be7b30f35)
This commit is contained in:
Marcel Admiraal 2020-07-30 11:25:28 +01:00 committed by Rémi Verschelde
parent 2987fb3b45
commit c8d8134288
1 changed files with 4 additions and 9 deletions

View File

@ -136,18 +136,13 @@ void CSGShape::_make_dirty() {
if (!is_inside_tree()) if (!is_inside_tree())
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 *CSGShape::_get_brush() { CSGBrush *CSGShape::_get_brush() {