Make sure pasted symbols get new pin UUIDs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8218
This commit is contained in:
parent
dd828bd964
commit
1e52f0a180
|
@ -565,7 +565,7 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
|
|||
wxString cache_name = CacheName( aProject->GetProjectFullName() );
|
||||
PART_LIB* cache_lib;
|
||||
|
||||
if( !cache_name.IsEmpty() )
|
||||
if( !aProject->IsNullProject() && !cache_name.IsEmpty() )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -1466,6 +1466,10 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
|
|||
symbol->ClearAnnotation( nullptr );
|
||||
symbol->SetUnit( unit );
|
||||
}
|
||||
|
||||
// Make sure pins get a new UUID
|
||||
for( SCH_PIN* pin : symbol->GetPins() )
|
||||
const_cast<KIID&>( pin->m_Uuid ) = KIID();
|
||||
}
|
||||
|
||||
if( item->Type() == SCH_SHEET_T )
|
||||
|
|
Loading…
Reference in New Issue