From: Thomas Debesse Date: Tue, 21 Jun 2022 01:57:24 +0000 (+0200) Subject: Merge commit 'b25e4389ba4d089fc94cc3860774c8510b843042' into master-merge X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=02282bbec513816e422bccd2255e17f7cdd8a08d;p=xonotic%2Fnetradiant.git Merge commit 'b25e4389ba4d089fc94cc3860774c8510b843042' into master-merge --- 02282bbec513816e422bccd2255e17f7cdd8a08d diff --cc radiant/csg.cpp index c034095d,374384b3..59ea7e9c --- a/radiant/csg.cpp +++ b/radiant/csg.cpp @@@ -598,17 -655,24 +642,20 @@@ void post( const scene::Path& path, sce else { ++m_before; - for ( brush_vector_t::const_iterator i = out.begin(); i != out.end(); ++i ) - { + for ( Brush *b : out ) { ++m_after; - ( *i )->removeEmptyFaces(); - if ( !( *i )->empty() ) { + b->removeEmptyFaces(); + if ( !b->empty() ) { NodeSmartReference node( ( new BrushNode() )->node() ); - Node_getBrush( node )->copy( *( *i ) ); - delete ( *i ); + Node_getBrush( node )->copy( *b ); Node_getTraversable( path.parent() )->insert( node ); } - else{ - delete ( *i ); - } + delete b; } Path_deleteTop( path ); + if( Node_getTraversable( path.parent() )->empty() ){ + m_eraseParent = true; + } } } }