Prevent footprint editing in power symbols

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16663
This commit is contained in:
Seth Hillbrand 2024-01-19 12:51:44 -08:00
parent 7fbeea0195
commit 7687f240a2
1 changed files with 8 additions and 1 deletions

View File

@ -1572,12 +1572,19 @@ int SCH_EDIT_TOOL::EditField( const TOOL_EVENT& aEvent )
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
if( aEvent.IsAction( &EE_ACTIONS::editReference ) )
{
editFieldText( symbol->GetField( REFERENCE_FIELD ) );
}
else if( aEvent.IsAction( &EE_ACTIONS::editValue ) )
{
editFieldText( symbol->GetField( VALUE_FIELD ) );
}
else if( aEvent.IsAction( &EE_ACTIONS::editFootprint ) )
{
if( !symbol->IsPower() )
editFieldText( symbol->GetField( FOOTPRINT_FIELD ) );
}
}
else if( item->Type() == SCH_FIELD_T )
{
SCH_FIELD* field = static_cast<SCH_FIELD*>( item );