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.
|
// less dependent on field ids and more dependent on names.
|
||||||
// Plus assumptions are made in the field editors.
|
// Plus assumptions are made in the field editors.
|
||||||
m_name = TEMPLATE_FIELDNAME::GetDefaultFieldName( id );
|
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;
|
wxString name;
|
||||||
|
|
||||||
|
|
|
@ -35,20 +35,20 @@ const wxString TEMPLATE_FIELDNAME::GetDefaultFieldName( int aFieldNdx )
|
||||||
// (mandatory fields)
|
// (mandatory fields)
|
||||||
switch( aFieldNdx )
|
switch( aFieldNdx )
|
||||||
{
|
{
|
||||||
case REFERENCE:
|
case REFERENCE:
|
||||||
return _( "Reference" ); // The component reference, R1, C1, etc.
|
return _( "Reference" ); // The component reference, R1, C1, etc.
|
||||||
|
|
||||||
case VALUE:
|
case VALUE:
|
||||||
return _( "Value" ); // The component value + name
|
return _( "Value" ); // The component value + name
|
||||||
|
|
||||||
case FOOTPRINT:
|
case FOOTPRINT:
|
||||||
return _( "Footprint" ); // The footprint for use with Pcbnew
|
return _( "Footprint" ); // The footprint for use with Pcbnew
|
||||||
|
|
||||||
case DATASHEET:
|
case DATASHEET:
|
||||||
return _( "Datasheet" ); // Link to a datasheet for component
|
return _( "Datasheet" ); // Link to a datasheet for component
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other fields are use fields, give a default name:
|
// Other fields are use fields, give a default name:
|
||||||
|
|
Loading…
Reference in New Issue