From d232ade75201d2f5fd44aa4f60d83e6d55ee288c Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 28 Nov 2022 09:09:12 -0800 Subject: [PATCH] Remove cloned items from groups When destroying, the group must be null and there's no group purpose in the DRC checks --- pcbnew/drc/drc_test_provider_edge_clearance.cpp | 6 ++++++ pcbnew/drc/drc_test_provider_library_parity.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/pcbnew/drc/drc_test_provider_edge_clearance.cpp b/pcbnew/drc/drc_test_provider_edge_clearance.cpp index fc05372e0c..09afe85a9b 100644 --- a/pcbnew/drc/drc_test_provider_edge_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_edge_clearance.cpp @@ -188,18 +188,22 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run() edges.back()->SetShape( SHAPE_T::SEGMENT ); edges.back()->SetEndX( shape->GetStartX() ); edges.back()->SetStroke( stroke ); + edges.back()->SetParentGroup( nullptr ); edges.emplace_back( static_cast( shape->Clone() ) ); edges.back()->SetShape( SHAPE_T::SEGMENT ); edges.back()->SetEndY( shape->GetStartY() ); edges.back()->SetStroke( stroke ); + edges.back()->SetParentGroup( nullptr ); edges.emplace_back( static_cast( shape->Clone() ) ); edges.back()->SetShape( SHAPE_T::SEGMENT ); edges.back()->SetStartX( shape->GetEndX() ); edges.back()->SetStroke( stroke ); + edges.back()->SetParentGroup( nullptr ); edges.emplace_back( static_cast( shape->Clone() ) ); edges.back()->SetShape( SHAPE_T::SEGMENT ); edges.back()->SetStartY( shape->GetEndY() ); edges.back()->SetStroke( stroke ); + edges.back()->SetParentGroup( nullptr ); } else if( shape->GetShape() == SHAPE_T::POLY && !shape->IsFilled() ) { @@ -215,12 +219,14 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run() edges.back()->SetStart( seg.A ); edges.back()->SetEnd( seg.B ); edges.back()->SetStroke( stroke ); + edges.back()->SetParentGroup( nullptr ); } } else { edges.emplace_back( static_cast( shape->Clone() ) ); edges.back()->SetStroke( stroke ); + edges.back()->SetParentGroup( nullptr ); } return true; diff --git a/pcbnew/drc/drc_test_provider_library_parity.cpp b/pcbnew/drc/drc_test_provider_library_parity.cpp index 7e5e7777d0..b3342cea9a 100644 --- a/pcbnew/drc/drc_test_provider_library_parity.cpp +++ b/pcbnew/drc/drc_test_provider_library_parity.cpp @@ -354,6 +354,7 @@ bool FOOTPRINT::FootprintNeedsUpdate( const FOOTPRINT* aLibFootprint ) { std::unique_ptr temp( static_cast( Clone() ) ); temp->Flip( {0,0}, false ); + temp->SetParentGroup( nullptr ); return temp->FootprintNeedsUpdate( aLibFootprint ); }