mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Schematic: don't allow setting footprint for power symbols
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16505
This commit is contained in:
parent
1e71899611
commit
2a04e6ac63
@ -430,10 +430,20 @@ wxGridCellAttr* FIELDS_GRID_TABLE<T>::GetAttr( int aRow, int aCol, wxGridCellAtt
|
||||
return m_valueAttr;
|
||||
}
|
||||
else if( m_parentType == SCH_SYMBOL_T && aRow == FOOTPRINT_FIELD )
|
||||
{
|
||||
// Power symbols have do not appear in the board, so don't allow
|
||||
// a footprint
|
||||
if( m_part->IsPower() )
|
||||
{
|
||||
m_readOnlyAttr->IncRef();
|
||||
return m_readOnlyAttr;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_footprintAttr->IncRef();
|
||||
return m_footprintAttr;
|
||||
}
|
||||
}
|
||||
else if( m_parentType == SCH_SYMBOL_T && aRow == DATASHEET_FIELD )
|
||||
{
|
||||
m_urlAttr->IncRef();
|
||||
@ -868,7 +878,8 @@ template class FIELDS_GRID_TABLE<LIB_FIELD>;
|
||||
|
||||
void FIELDS_GRID_TRICKS::showPopupMenu( wxMenu& menu, wxGridEvent& aEvent )
|
||||
{
|
||||
if( m_grid->GetGridCursorRow() == FOOTPRINT_FIELD && m_grid->GetGridCursorCol() == FDC_VALUE )
|
||||
if( m_grid->GetGridCursorRow() == FOOTPRINT_FIELD && m_grid->GetGridCursorCol() == FDC_VALUE
|
||||
&& !m_grid->IsReadOnly( FOOTPRINT_FIELD, FDC_VALUE ) )
|
||||
{
|
||||
menu.Append( MYID_SELECT_FOOTPRINT, _( "Select Footprint..." ),
|
||||
_( "Browse for footprint" ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user