From 9be7b30f3536057b22fd70d5367268749c1a7ea9 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Thu, 30 Jul 2020 11:25:28 +0100 Subject: Ensure CSG parent's _make_dirty() is called when entering a tree. --- modules/csg/csg_shape.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'modules/csg/csg_shape.cpp') 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() { -- cgit v1.2.3