Commit 304c296a authored by CHARRAS's avatar CHARRAS

fixed: eeschema crashed when created a B.O.M. (unicode build)

parent f9426909
......@@ -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 <jean-pierre.charras@inpg.fr>
================================================================================
+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 <plyatov@mail.ru>
================================================================================
+eeschema
......
......@@ -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;
}
}
......
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