Make sure pasted sheet instances get added.

Fixes https://gitlab.com/kicad/code/kicad/issues/7872
This commit is contained in:
Jeff Young 2021-03-13 12:26:05 +00:00
parent 03b280589e
commit e34734c230
1 changed files with 2 additions and 0 deletions

View File

@ -1343,6 +1343,7 @@ void SCH_EDITOR_CONTROL::updatePastedInstances( const SCH_SHEET_PATH& aPastePath
KIID_PATH clipPath = aClipPath;
clipPath.push_back( sheet->m_Uuid );
sheet->AddInstance( pastePath.Path() );
updatePastedInstances( pastePath, clipPath, sheet, aForceKeepAnnotations );
}
}
@ -1530,6 +1531,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
SCH_SHEET_PATH pastePath = pasteRoot;
pastePath.push_back( sheet );
sheet->AddInstance( pastePath.Path() );
updatePastedInstances( pastePath, clipPath, sheet, forceKeepAnnotations );
}