kicad-developers team mailing list archive
Mailing list archive
Re: Is this really a good idea?
Le 05/02/2013 08:34, Lorenzo Marcantonio a écrit :
During today merge I spotted this thing in backanno.cpp:
/* Give a reasonable value to the field position and
* orientation, if the text is empty at position 0, because
* it is probably not yet initialized
if( fpfield->m_Text.IsEmpty() &&
( fpfield->GetPosition() == component->GetPosition() ) )
fpfield->m_Orient = component->GetField( VALUE )->m_Orient;
fpfield->SetPosition( component->GetField( VALUE )->GetPosition() );
fpfield->m_Size = component->GetField( VALUE )->m_Size;
if( fpfield->m_Orient == 0 )
fpfield->m_Pos.y += 100;
fpfield->m_Pos.x += 100;
Are we sure that this would be the right thing to do? Wouldn't it be
better to set the default in the library (during component creation) so
that no special case is needed?
What if somebody wanted to have the module at the origin (typical:
a resistor with the package written inside)? Anyway I feel
that the '100' is not too useful anyway with many components layout (for
example I have the module usually at 250-400, since I put it below the
IMHO it's a case where we're trying to be smart without it being
necessary... I propose to just put it as default during 'new component'
creation (maybe along with a not-empty default, so you don't forget to
place it in the component editor).