Commit 02b670d8 authored by charras's avatar charras
Browse files

minor change in eeschema.

parent f7d1c72a
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -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 );
+7 −3
Original line number Original line Diff line number Diff line
@@ -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" );