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:
parent
c29dfe026e
commit
126225866b
|
@ -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 ) ) )
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue