crossprobing pcb->schematic: handle correctly empty sheets.

(filtering selection candidates was not made for empty sheets)
Fixes #12427
https://gitlab.com/kicad/code/kicad/issues/12427
This commit is contained in:
jean-pierre charras 2022-09-15 17:52:57 +02:00
parent aeb4021854
commit 8a0384e2f6
1 changed files with 6 additions and 0 deletions

View File

@ -553,6 +553,12 @@ bool sheetContainsOnlyWantedItems(
SCH_REFERENCE_LIST references;
aSheetPath.GetSymbols( references, false, true );
if( references.GetCount() == 0 ) // Empty sheet, obviously do not contain wanted items
{
aCache.emplace( aSheetPath, false );
return false;
}
for( unsigned ii = 0; ii < references.GetCount(); ii++ )
{
SCH_REFERENCE& schRef = references[ii];