diff --git a/change_log.txt b/change_log.txt index 3c6699e046..ffd1d3c98e 100644 --- a/change_log.txt +++ b/change_log.txt @@ -5,6 +5,13 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. +2008-Feb-18 UPDATE Jean-Pierre Charras +================================================================================ ++eeschema + Fixed bug in gen bill of material (dialog_build_BOM.cpp): + eeschema crashed when created a B.O.M. (i think: unicode version only) + + 2008-Feb-18 UPDATE Igor Plyatov ================================================================================ +eeschema diff --git a/eeschema/dialog_build_BOM.cpp b/eeschema/dialog_build_BOM.cpp index 3808094ac4..4817ff6b14 100644 --- a/eeschema/dialog_build_BOM.cpp +++ b/eeschema/dialog_build_BOM.cpp @@ -573,7 +573,7 @@ wxString mask, filename; CreateExportList(m_ListFileName); EndModal( 1 ); - + // if( s_BrowsList ) if( m_GetListBrowser->GetValue() ) { @@ -581,6 +581,7 @@ wxString mask, filename; AddDelimiterString(filename); ExecuteFile(this, editorname, filename); } + } @@ -1042,23 +1043,23 @@ const wxString * Text1, *Text2; /**************************************************************/ static void DeleteSubCmp( ListComponent * List, int NbItems ) /**************************************************************/ -/* Supprime les sous-composants, c'est a dire les descriptions redonnantes des - * boitiers multiples - * La liste des composant doit etre triee par reference et par num d'unite +/* Remove sub components from the list, when multiples parts per package are found in this list + * The component list **MUST** be sorted by reference and by unit number */ { int ii; EDA_SchComponentStruct * LibItem; -wxString OldName; +wxString OldName, CurrName; for( ii = 0; ii < NbItems; ii++ ) { LibItem = List[ii].m_Comp; if( LibItem == NULL ) continue; + CurrName = CONV_FROM_UTF8(List[ii].m_Ref); if( !OldName.IsEmpty() ) { - if( strcmp(OldName.mb_str(), List[ii].m_Ref ) == 0 ) + if( OldName == CurrName ) // CurrName is a subpart of OldName: remove it { List[ii].m_Comp = NULL; List[ii].m_SheetList.Clear(); @@ -1066,7 +1067,7 @@ wxString OldName; } } - OldName.Printf(_("%s"), List[ii].m_Ref ); + OldName = CurrName; } }