Don't add footprint components to PCB group

Footprint components are only group-able inside of the footprint editor

Fixes https://gitlab.com/kicad/code/kicad/issues/13396
This commit is contained in:
Seth Hillbrand 2023-01-05 15:28:31 -08:00
parent c29dfe026e
commit 126225866b
2 changed files with 10 additions and 1 deletions

View File

@ -147,6 +147,7 @@ void DIALOG_GROUP_PROPERTIES::OnAddMember( wxCommandEvent& event )
void DIALOG_GROUP_PROPERTIES::DoAddMember( EDA_ITEM* aItem )
{
for( size_t ii = 0; ii < m_membersList->GetCount(); ++ii )
{
if( aItem == static_cast<BOARD_ITEM*>( m_membersList->GetClientData( ii ) ) )

View File

@ -161,7 +161,15 @@ int GROUP_TOOL::PickNewMember( const TOOL_EVENT& aEvent )
if( m_propertiesDialog )
{
m_propertiesDialog->DoAddMember( sel.Front() );
EDA_ITEM* elem = sel.Front();
if( !m_isFootprintEditor )
{
while( elem->GetParent() && elem->GetParent()->Type() != PCB_T )
elem = elem->GetParent();
}
m_propertiesDialog->DoAddMember( elem );
m_propertiesDialog->Show( true );
}