FP editor: allows FOOTPRINT field to be editable.

Although it had no meaning in FP editor, it needs to be edited in some cases,
as it is a member of a library footprint.
This commit is contained in:
jean-pierre charras 2023-10-23 12:53:25 +02:00
parent 97901c9ac5
commit 504b3cd174
2 changed files with 6 additions and 3 deletions

View File

@ -113,8 +113,8 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, PC
}
else
{
// Don't let users modify the library link
if( field->IsFootprint() )
// Don't let users modify the library link, in the board editor
if( field->IsFootprint() && !m_frame->IsType( FRAME_FOOTPRINT_EDITOR ) )
m_SingleLineText->SetEditable( false );
title = _( "Footprint Field Properties" );

View File

@ -87,7 +87,10 @@ FP_TEXT_GRID_TABLE::FP_TEXT_GRID_TABLE( PCB_BASE_FRAME* aFrame, DIALOG_SHIM* aDi
m_valueAttr->SetEditor( valueEditor );
m_footprintAttr = new wxGridCellAttr;
m_footprintAttr->SetReadOnly( true );
if( !m_frame->IsType( FRAME_FOOTPRINT_EDITOR ) )
m_footprintAttr->SetReadOnly( true );
GRID_CELL_FPID_EDITOR* fpIdEditor = new GRID_CELL_FPID_EDITOR( m_dialog, "" );
fpIdEditor->SetValidator( m_nonUrlValidator );
m_footprintAttr->SetEditor( fpIdEditor );