Fix overly aggressive sheet instance pruning.

(cherry picked from commit b3a36bd783)
This commit is contained in:
Wayne Stambaugh 2024-01-23 07:44:45 -05:00
parent 35094a786d
commit 0828ee3b10
1 changed files with 1 additions and 1 deletions

View File

@ -1962,7 +1962,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
for( const SCH_SHEET_INSTANCE& pastedInstance : sheet->GetInstances() )
{
if( pastedInstance.m_ProjectName != m_frame->Prj().GetProjectName() )
if( !hierarchy.HasPath( pastedInstance.m_Path ) )
instancesToRemove.push_back( pastedInstance.m_Path );
}