Prevent footprint editing in power symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16663
This commit is contained in:
parent
7fbeea0195
commit
7687f240a2
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue