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,11 +1572,18 @@ 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 ) )
editFieldText( symbol->GetField( FOOTPRINT_FIELD ) );
{
if( !symbol->IsPower() )
editFieldText( symbol->GetField( FOOTPRINT_FIELD ) );
}
}
else if( item->Type() == SCH_FIELD_T )
{