Eeschema: make footprint and datasheet initially invisible, when creating a component
This commit is contained in:
parent
74d3cfd688
commit
544554086e
|
@ -78,6 +78,17 @@ void LIB_FIELD::Init( int id )
|
|||
// less dependent on field ids and more dependent on names.
|
||||
// Plus assumptions are made in the field editors.
|
||||
m_name = TEMPLATE_FIELDNAME::GetDefaultFieldName( id );
|
||||
|
||||
switch( id )
|
||||
{
|
||||
case DATASHEET:
|
||||
case FOOTPRINT:
|
||||
// by contrast, VALUE and REFERENCE are are always constructed as
|
||||
// initially visible, and template fieldsnames' initial visibility
|
||||
// is controlled by the template fieldname configuration record.
|
||||
SetVisible( false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -563,7 +574,7 @@ void LIB_FIELD::Rotate()
|
|||
}
|
||||
|
||||
|
||||
wxString LIB_FIELD::GetName(bool aTranslate) const
|
||||
wxString LIB_FIELD::GetName( bool aTranslate ) const
|
||||
{
|
||||
wxString name;
|
||||
|
||||
|
|
|
@ -35,20 +35,20 @@ const wxString TEMPLATE_FIELDNAME::GetDefaultFieldName( int aFieldNdx )
|
|||
// (mandatory fields)
|
||||
switch( aFieldNdx )
|
||||
{
|
||||
case REFERENCE:
|
||||
return _( "Reference" ); // The component reference, R1, C1, etc.
|
||||
case REFERENCE:
|
||||
return _( "Reference" ); // The component reference, R1, C1, etc.
|
||||
|
||||
case VALUE:
|
||||
return _( "Value" ); // The component value + name
|
||||
case VALUE:
|
||||
return _( "Value" ); // The component value + name
|
||||
|
||||
case FOOTPRINT:
|
||||
return _( "Footprint" ); // The footprint for use with Pcbnew
|
||||
case FOOTPRINT:
|
||||
return _( "Footprint" ); // The footprint for use with Pcbnew
|
||||
|
||||
case DATASHEET:
|
||||
return _( "Datasheet" ); // Link to a datasheet for component
|
||||
case DATASHEET:
|
||||
return _( "Datasheet" ); // Link to a datasheet for component
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Other fields are use fields, give a default name:
|
||||
|
|
Loading…
Reference in New Issue