Don't forget intersheet refs when collecting non-view items.

Fixes https://gitlab.com/kicad/code/kicad/issues/7819
This commit is contained in:
Jeff Young 2021-03-07 14:32:49 +00:00
parent 3ab1ef7b83
commit 22b4a74bfa
1 changed files with 10 additions and 0 deletions

View File

@ -1254,6 +1254,16 @@ bool EE_SELECTION_TOOL::selectMultiple()
for( SCH_FIELD& field : symbol->GetFields() ) for( SCH_FIELD& field : symbol->GetFields() )
children.emplace_back( KIGFX::VIEW::LAYER_ITEM_PAIR( &field, layer ) ); children.emplace_back( KIGFX::VIEW::LAYER_ITEM_PAIR( &field, layer ) );
} }
SCH_GLOBALLABEL* gLabel = dynamic_cast<SCH_GLOBALLABEL*>( pair.first );
if( gLabel )
{
int layer = pair.second;
SCH_FIELD* intersheetRef = gLabel->GetIntersheetRefs();
children.emplace_back( KIGFX::VIEW::LAYER_ITEM_PAIR( intersheetRef, layer ) );
}
} }
selectedItems.insert( selectedItems.end(), children.begin(), children.end() ); selectedItems.insert( selectedItems.end(), children.begin(), children.end() );