Commit 02b670d8 authored by charras's avatar charras

minor change in eeschema.

parent f7d1c72a
...@@ -148,7 +148,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert ) ...@@ -148,7 +148,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
// Arc is reduced to a line from m_Start to m_End. // Arc is reduced to a line from m_Start to m_End.
// TO DO better. // TODO better.
LibDrawArc* Arc = (LibDrawArc*) DrawEntry; LibDrawArc* Arc = (LibDrawArc*) DrawEntry;
x1 = Arc->m_ArcStart.x; x1 = Arc->m_ArcStart.x;
y1 = Arc->m_ArcStart.y; y1 = Arc->m_ArcStart.y;
...@@ -202,7 +202,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert ) ...@@ -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 ) ...@@ -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 );
......
...@@ -10,6 +10,7 @@ ...@@ -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 @@ ...@@ -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 ...@@ -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" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment