From 27afd22bbfa86a8cdf0d80ad7048be436e037c07 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 17 May 2023 23:03:06 -0400 Subject: [PATCH] Specctra: remove grouped tracks from group before cleaning up Fixes https://gitlab.com/kicad/code/kicad/-/issues/14763 --- pcbnew/specctra_import_export/specctra_import.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pcbnew/specctra_import_export/specctra_import.cpp b/pcbnew/specctra_import_export/specctra_import.cpp index 7804fd4724..12cd099cc9 100644 --- a/pcbnew/specctra_import_export/specctra_import.cpp +++ b/pcbnew/specctra_import_export/specctra_import.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -356,9 +357,16 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) aBoard->Tracks().pop_back(); if( track->IsLocked() ) + { locked.push_back( track ); + } else + { + if( PCB_GROUP* group = track->GetParentGroup() ) + group->RemoveItem( track ); + delete track; + } } aBoard->DeleteMARKERs();