Don't tie generic validators to a specific field.
Fixes: lp:1834103 * https://bugs.launchpad.net/kicad/+bug/1834103
This commit is contained in:
parent
cb1fd069f0
commit
15cd13ba6e
|
@ -54,8 +54,8 @@ FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, SCH_BASE_FRAME* a
|
|||
m_referenceValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), REFERENCE ),
|
||||
m_valueValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), VALUE ),
|
||||
m_libIdValidator( LIB_ID::ID_PCB ),
|
||||
m_urlValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), DATASHEET ),
|
||||
m_nonUrlValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), DATASHEET )
|
||||
m_urlValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), FIELD_VALUE ),
|
||||
m_nonUrlValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), FIELD_VALUE )
|
||||
{
|
||||
// Build the various grid cell attributes.
|
||||
// NOTE: validators and cellAttrs are member variables to get the destruction order
|
||||
|
|
|
@ -84,12 +84,13 @@ bool SCH_FIELD_VALIDATOR::Validate( wxWindow *aParent )
|
|||
|
||||
switch( m_fieldId )
|
||||
{
|
||||
case FIELD_NAME: fieldName = _( "field name" ); break;
|
||||
case REFERENCE: fieldName = _( "reference field" ); break;
|
||||
case VALUE: fieldName = _( "value field" ); break;
|
||||
case FOOTPRINT: fieldName = _( "footprint field" ); break;
|
||||
case DATASHEET: fieldName = _( "datasheet field" ); break;
|
||||
default: fieldName = _( "user defined field" ); break;
|
||||
case FIELD_NAME: fieldName = _( "field name" ); break;
|
||||
case FIELD_VALUE: fieldName = _( "field value" ); break;
|
||||
case REFERENCE: fieldName = _( "reference field" ); break;
|
||||
case VALUE: fieldName = _( "value field" ); break;
|
||||
case FOOTPRINT: fieldName = _( "footprint field" ); break;
|
||||
case DATASHEET: fieldName = _( "datasheet field" ); break;
|
||||
default: fieldName = _( "user defined field" ); break;
|
||||
};
|
||||
|
||||
wxString msg;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
|
||||
#define FIELD_NAME -1
|
||||
#define FIELD_VALUE -2
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue