From afe0c79a1e12be5994d968a8e765f02de701bd0c Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 18 Apr 2021 22:14:15 -0400 Subject: [PATCH] Sheet pins need new UUIDs, too --- eeschema/tools/sch_editor_control.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 3b9fc4c353..cba435a1fb 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -1549,6 +1549,10 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent ) sheet->AddInstance( pastePath.Path() ); sheet->SetPageNumber( pastePath, pageNum ); updatePastedInstances( pastePath, clipPath, sheet, forceKeepAnnotations ); + + // Make sure pins get a new UUID + for( SCH_SHEET_PIN* pin : sheet->GetPins() ) + const_cast( pin->m_Uuid ) = KIID(); } item->SetFlags( IS_NEW | IS_PASTED | IS_MOVED );