From f5707eeca72f91f659b1d1a6b75eb11033d61f84 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 22 Nov 2022 16:45:19 -0500 Subject: [PATCH] Fix assertion in schematic copy formatter. --- eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp index 7b7ef164ce..429f492a7e 100644 --- a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp +++ b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp @@ -536,8 +536,6 @@ void SCH_SEXPR_PLUGIN::Format( EE_SELECTION* aSelection, SCH_SHEET_PATH* aSelect // Store the selected sheets instance information SCH_SHEET_LIST selectedSheets; - selectedSheets.push_back( *aSelectionPath ); // Include the "root" of the selection - SCH_REFERENCE_LIST selectedSymbols; for( i = 0; i < aSelection->GetSize(); ++i ) @@ -620,6 +618,7 @@ void SCH_SEXPR_PLUGIN::Format( EE_SELECTION* aSelection, SCH_SHEET_PATH* aSelect "Sheet is not inside the selection path?" ); } + selectionPath = aSelectionPath->Path(); selectedSymbols.SortByReferenceOnly(); std::vector symbolInstances = selectedSymbols.GetSymbolInstances();