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 ...@@ -5,6 +5,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. 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> 2008-Feb-18 UPDATE Igor Plyatov <plyatov@mail.ru>
================================================================================ ================================================================================
+eeschema +eeschema
......
...@@ -573,7 +573,7 @@ wxString mask, filename; ...@@ -573,7 +573,7 @@ wxString mask, filename;
CreateExportList(m_ListFileName); CreateExportList(m_ListFileName);
EndModal( 1 ); EndModal( 1 );
// if( s_BrowsList ) // if( s_BrowsList )
if( m_GetListBrowser->GetValue() ) if( m_GetListBrowser->GetValue() )
{ {
...@@ -581,6 +581,7 @@ wxString mask, filename; ...@@ -581,6 +581,7 @@ wxString mask, filename;
AddDelimiterString(filename); AddDelimiterString(filename);
ExecuteFile(this, editorname, filename); ExecuteFile(this, editorname, filename);
} }
} }
...@@ -1042,23 +1043,23 @@ const wxString * Text1, *Text2; ...@@ -1042,23 +1043,23 @@ const wxString * Text1, *Text2;
/**************************************************************/ /**************************************************************/
static void DeleteSubCmp( ListComponent * List, int NbItems ) static void DeleteSubCmp( ListComponent * List, int NbItems )
/**************************************************************/ /**************************************************************/
/* Supprime les sous-composants, c'est a dire les descriptions redonnantes des /* Remove sub components from the list, when multiples parts per package are found in this list
* boitiers multiples * The component list **MUST** be sorted by reference and by unit number
* La liste des composant doit etre triee par reference et par num d'unite
*/ */
{ {
int ii; int ii;
EDA_SchComponentStruct * LibItem; EDA_SchComponentStruct * LibItem;
wxString OldName; wxString OldName, CurrName;
for( ii = 0; ii < NbItems; ii++ ) for( ii = 0; ii < NbItems; ii++ )
{ {
LibItem = List[ii].m_Comp; LibItem = List[ii].m_Comp;
if( LibItem == NULL ) if( LibItem == NULL )
continue; continue;
CurrName = CONV_FROM_UTF8(List[ii].m_Ref);
if( !OldName.IsEmpty() ) 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_Comp = NULL;
List[ii].m_SheetList.Clear(); List[ii].m_SheetList.Clear();
...@@ -1066,7 +1067,7 @@ wxString OldName; ...@@ -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