From 0828ee3b10b69870495a2f14c353315a11f81070 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. (cherry picked from commit b3a36bd7837058fffd2048b29df563f808c8988a) --- 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 369929fe80..7de722d71a 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -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 ); }