From b3a36bd7837058fffd2048b29df563f808c8988a Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 23 Jan 2024 07:44:45 -0500 Subject: [PATCH] Fix overly aggressive sheet instance pruning. --- eeschema/tools/sch_editor_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 9119fb0e1a..58991716c9 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -1970,7 +1970,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent ) for( const SCH_SHEET_INSTANCE& instance : sheet->GetInstances() ) { - if( instance.m_ProjectName != m_frame->Prj().GetProjectName() ) + if( !hierarchy.HasPath( instance.m_Path ) ) instancesToRemove.push_back( instance.m_Path ); }