Loading eeschema/component_class.h +2 −2 Original line number Diff line number Diff line Loading @@ -158,8 +158,8 @@ public: /** * Function AddField * adds a field to the component. The component takes over ownership * of the field. * adds a field to the component. The field is copied as it is put into * the component. * @param aField A const reference to the SCH_CMP_FIELD to add. */ void AddField( const SCH_CMP_FIELD& aField ); Loading eeschema/load_one_schematic_file.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -516,6 +516,8 @@ static int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, SCH_COMPONENT* component; int Failed = 0, newfmt = 0; char* ptcar; wxString fieldName; component = new SCH_COMPONENT(); Loading Loading @@ -671,8 +673,6 @@ static int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, int hjustify = GR_TEXT_HJUSTIFY_CENTER; int vjustify = GR_TEXT_VJUSTIFY_CENTER; wxString fieldName; FieldUserName[0] = 0; /* Lecture du champ */ Loading Loading @@ -712,13 +712,11 @@ static int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, ReadDelimitedText( FieldUserName, ptcar, sizeof(FieldUserName) ); if( 0 == strlen(FieldUserName) ) if( !FieldUserName[0] ) fieldName = ReturnDefaultFieldName( fieldNdx ); else fieldName = CONV_FROM_UTF8( FieldUserName ); D(printf("FiledUserName=\"%s\"\n", FieldUserName );) if( fieldNdx >= component->GetFieldCount() ) { // add as many fields as needed so the m_FieldId's are contiguous, no gaps. Loading Loading
eeschema/component_class.h +2 −2 Original line number Diff line number Diff line Loading @@ -158,8 +158,8 @@ public: /** * Function AddField * adds a field to the component. The component takes over ownership * of the field. * adds a field to the component. The field is copied as it is put into * the component. * @param aField A const reference to the SCH_CMP_FIELD to add. */ void AddField( const SCH_CMP_FIELD& aField ); Loading
eeschema/load_one_schematic_file.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -516,6 +516,8 @@ static int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, SCH_COMPONENT* component; int Failed = 0, newfmt = 0; char* ptcar; wxString fieldName; component = new SCH_COMPONENT(); Loading Loading @@ -671,8 +673,6 @@ static int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, int hjustify = GR_TEXT_HJUSTIFY_CENTER; int vjustify = GR_TEXT_VJUSTIFY_CENTER; wxString fieldName; FieldUserName[0] = 0; /* Lecture du champ */ Loading Loading @@ -712,13 +712,11 @@ static int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, ReadDelimitedText( FieldUserName, ptcar, sizeof(FieldUserName) ); if( 0 == strlen(FieldUserName) ) if( !FieldUserName[0] ) fieldName = ReturnDefaultFieldName( fieldNdx ); else fieldName = CONV_FROM_UTF8( FieldUserName ); D(printf("FiledUserName=\"%s\"\n", FieldUserName );) if( fieldNdx >= component->GetFieldCount() ) { // add as many fields as needed so the m_FieldId's are contiguous, no gaps. Loading