Don't consider saving SCH_MARKERs

These are ephemeral, view-only elements, so don't include them in our
save map

Fixes https://gitlab.com/kicad/code/kicad/issues/11405
This commit is contained in:
Seth Hillbrand 2023-04-19 16:59:59 -07:00
parent a154571438
commit 7eb728ca12
1 changed files with 5 additions and 1 deletions

View File

@ -397,7 +397,11 @@ void SCH_SEXPR_PLUGIN::Format( SCH_SHEET* aSheet )
std::multiset<SCH_ITEM*, decltype( cmp )> save_map( cmp );
for( SCH_ITEM* item : screen->Items() )
save_map.insert( item );
{
// Markers are not saved, so keep them from being considered below
if( item->Type() != SCH_MARKER_T )
save_map.insert( item );
}
KICAD_T itemType = TYPE_NOT_INIT;
SCH_LAYER_ID layer = SCH_LAYER_ID_START;