Sheet pins need new UUIDs, too

This commit is contained in:
Jon Evans 2021-04-18 22:14:15 -04:00
parent 1e52f0a180
commit afe0c79a1e
1 changed files with 4 additions and 0 deletions

View File

@ -1549,6 +1549,10 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
sheet->AddInstance( pastePath.Path() ); sheet->AddInstance( pastePath.Path() );
sheet->SetPageNumber( pastePath, pageNum ); sheet->SetPageNumber( pastePath, pageNum );
updatePastedInstances( pastePath, clipPath, sheet, forceKeepAnnotations ); updatePastedInstances( pastePath, clipPath, sheet, forceKeepAnnotations );
// Make sure pins get a new UUID
for( SCH_SHEET_PIN* pin : sheet->GetPins() )
const_cast<KIID&>( pin->m_Uuid ) = KIID();
} }
item->SetFlags( IS_NEW | IS_PASTED | IS_MOVED ); item->SetFlags( IS_NEW | IS_PASTED | IS_MOVED );