minor improvement for russian GOST build BOM

This commit is contained in:
Andrey Fedorushkov 2010-09-30 18:19:09 +04:00
parent 22f483e1d8
commit d247025d19
2 changed files with 22 additions and 1 deletions

View File

@ -789,6 +789,10 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
wxString refName;
wxString fullRefName; // reference + part Id (for multiple parts per package
wxString valName;
#if defined(KICAD_GOST)
wxString footName;
wxString datsName;
#endif
wxString refNames;
wxString lastRef;
wxString unitId;
@ -819,6 +823,10 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
refName = aList[ii].GetRef();
valName = currCmp->GetField( VALUE )->m_Text;
#if defined(KICAD_GOST)
footName = currCmp->GetField( FOOTPRINT )->m_Text;
datsName = currCmp->GetField( DATASHEET )->m_Text;
#endif
int multi = 0;
if( aIncludeSubComponents )
@ -850,7 +858,13 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
lastRef = refName;
// if the next cmoponent has same value the line will be printed after.
#if defined(KICAD_GOST)
if( nextCmp && nextCmp->GetField( VALUE )->m_Text.CmpNoCase( valName ) == 0
&& nextCmp->GetField( FOOTPRINT )->m_Text.CmpNoCase( footName ) == 0
&& nextCmp->GetField( DATASHEET )->m_Text.CmpNoCase( datsName ) == 0 )
#else
if( nextCmp && nextCmp->GetField( VALUE )->m_Text.CmpNoCase( valName ) == 0 )
#endif
continue;
// Print line for the current component value:
@ -858,11 +872,15 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
if( IsFieldChecked(FOOTPRINT ) )
fprintf( f, "%c%15s", s_ExportSeparatorSymbol,
#if defined(KICAD_GOST)
CONV_TO_UTF8( footName ) );
#else
CONV_TO_UTF8( currCmp->GetField( FOOTPRINT )->m_Text ) );
#endif
#if defined(KICAD_GOST)
fprintf( f, "%c%20s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( currCmp->GetField( DATASHEET )->m_Text ) );
CONV_TO_UTF8( datsName ) );
#endif
// wrap the field in quotes, since it has commas in it.

View File

@ -465,6 +465,9 @@ wxString WinEDA_SchematicFrame::GetUniqueFilenameForCurrentSheet()
filename += m_CurrentSheet->PathHumanReadable();
filename.Replace( wxT( "/" ), wxT( "-" ) );
filename.RemoveLast();
#if defined(KICAD_GOST)
filename.Remove( 0, 1 );
#endif
}
else
{