minor change in eeschema.

This commit is contained in:
charras 2009-01-01 08:29:38 +00:00
parent f7d1c72a08
commit 02b670d8b3
2 changed files with 11 additions and 7 deletions

View File

@ -202,7 +202,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
xmax = MAX( xmax, x1 ); xmax = MAX( xmax, x1 );
ymin = MIN( ymin, y1 ); ymin = MIN( ymin, y1 );
ymax = MAX( ymax, y1 ); ymax = MAX( ymax, y1 );
#if 0 \ #if 0
// 0 pour englober le point origine de la pin, 1 pour englober toute la pin // 0 pour englober le point origine de la pin, 1 pour englober toute la pin
switch( Pin->Orient ) switch( Pin->Orient )
{ {
@ -255,8 +255,8 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
} }
} }
// Update the BoundaryBox. Remenber the fact the screen Y axis is the reverse */ // Update the BoundaryBox. Remember the fact the screen Y axis is the reverse */
ymax = -ymax; ymin = -ymin; // Y is is screen axis sense NEGATE(ymax); NEGATE(ymin); // Y is not is screen axis sense
// Ensure w and H > 0 (wxRect assume it) // Ensure w and H > 0 (wxRect assume it)
if( xmax < xmin ) if( xmax < xmin )
EXCHG( xmax, xmin ); EXCHG( xmax, xmin );

View File

@ -10,6 +10,7 @@
#include "libcmp.h" #include "libcmp.h"
#include "general.h" #include "general.h"
#include "protos.h"
/***************************/ /***************************/
/* class LibraryFieldEntry */ /* class LibraryFieldEntry */
@ -17,7 +18,7 @@
/* a Field is a string linked to a component. /* a Field is a string linked to a component.
* Unlike a pure graphic text, fields can be used in netlist generation * Unlike a pure graphic text, fields can be used in netlist generation
* and other things. * and other told (BOM).
* *
* 4 fields have a special meaning: * 4 fields have a special meaning:
* REFERENCE * REFERENCE
@ -101,8 +102,11 @@ bool LibDrawField::Save( FILE* ExportFile ) const
m_Italic ? 'I' : 'N', m_Italic ? 'I' : 'N',
m_Width > 1 ? 'B' : 'N' ); m_Width > 1 ? 'B' : 'N' );
// Save field name, if necessary /* Save field name, if necessary
if( m_FieldId >= FIELD1 && !m_Name.IsEmpty() ) * Field name is saved only if it is not the default name.
* Just because default name depends on the language and can change from a country to an other
*/
if( m_FieldId >= FIELD1 && !m_Name.IsEmpty() && m_Name != ReturnDefaultFieldName( m_FieldId ))
fprintf( ExportFile, " \"%s\"", CONV_TO_UTF8( m_Name ) ); fprintf( ExportFile, " \"%s\"", CONV_TO_UTF8( m_Name ) );
fprintf( ExportFile, "\n" ); fprintf( ExportFile, "\n" );