diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp index 01f529e9d1..b1948bd6d7 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.cpp @@ -1300,6 +1300,13 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary( const SYMDEF_ID& aSymdef SYMDEF_SCM symbol = Library.SymbolDefinitions.at( aSymdefID ); int gateNumber = getKiCadUnitNumberFromGate( aGateID ); + // Ensure there are no items on this unit (e.g. if we already previously loaded the symbol from + // the part definition) + std::vector drawItems = aSymbol->GetUnitDrawItems( gateNumber, 0 ); + + for( LIB_ITEM* item : drawItems ) + aSymbol->RemoveDrawItem( item ); + for( std::pair figPair : symbol.Figures ) { FIGURE fig = figPair.second;