Commit b827c29b authored by charras's avatar charras
Browse files

solved: eeschema, small problem with fields selections in BOM generation

parent 9131e2a1
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -94,17 +94,6 @@ void ReAnnotatePowerSymbolsOnly( void )
}


CmpListStruct* AllocateCmpListStrct( int numcomponents )
{
    int            ii = numcomponents * sizeof(CmpListStruct);

    //allocate memory and fill this memory with zeros.
    CmpListStruct* list = (CmpListStruct*) MyZMalloc( ii );

    return list;
}


/* qsort function to annotate items by their position.
 *  Components are sorted
 *      by reference
@@ -296,7 +285,7 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent,
    if( NbOfCmp == 0 )
        return;

    BaseListeCmp = AllocateCmpListStrct( NbOfCmp );
    BaseListeCmp = (CmpListStruct*) MyZMalloc( NbOfCmp * sizeof(CmpListStruct) );

    /* Second pass : Init data tables */
    if( annotateSchematic )
@@ -712,7 +701,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool oneSheetOnly )


    /* Second pass : create the list of components */
    ListeCmp = AllocateCmpListStrct( NbOfCmp );
    ListeCmp = (CmpListStruct*) MyZMalloc( NbOfCmp * sizeof(CmpListStruct) );

    if( !oneSheetOnly )
    {
+51 −42
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@ void WinEDA_Build_BOM_Frame::PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem
                                             bool CompactForm )
/*******************************************************************************************/
{
    static const wxCheckBox* FieldListCtrl[] = {
    const wxCheckBox* FieldListCtrl[] = {
        m_AddField1,
        m_AddField2,
        m_AddField3,
@@ -608,13 +608,16 @@ void WinEDA_Build_BOM_Frame::PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem
    int ii;
    const wxCheckBox* FieldCtrl = FieldListCtrl[0];

    if( m_AddFootprintField->IsChecked() )
    {
        if( CompactForm )
        {
            fprintf( f, "%c%s", s_ExportSeparatorSymbol,
                    CONV_TO_UTF8( DrawLibItem->m_Field[FOOTPRINT].m_Text ) );
        }
    else if( m_AddFootprintField->IsChecked() )
        else
            fprintf( f, "; %-12s", CONV_TO_UTF8( DrawLibItem->m_Field[FOOTPRINT].m_Text ) );
    }

    for( ii = FIELD1; ii <= FIELD8; ii++ )
    {
@@ -633,8 +636,11 @@ void WinEDA_Build_BOM_Frame::PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem


/*********************************************************************************************/
int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f, ListComponent* aList, int aItemCount,
                                                      bool CompactForm, bool aIncludeSubComponents )
int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f,
                                                      ListComponent* aList,
                                                      int aItemCount,
                                                      bool CompactForm,
                                                      bool aIncludeSubComponents )
/*********************************************************************************************/

/* Print the B.O.M sorted by reference
@@ -649,7 +655,7 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f, ListComponent* aL

    if( CompactForm )
    {
        static const wxCheckBox* FieldListCtrl[FIELD8 - FIELD1 + 1] = {
        const wxCheckBox* FieldListCtrl[FIELD8 - FIELD1 + 1] = {
            m_AddField1,
            m_AddField2,
            m_AddField3,
@@ -666,6 +672,7 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f, ListComponent* aL
        if( aIncludeSubComponents )
            fprintf( f, "%csheet path", s_ExportSeparatorSymbol );

        if( m_AddFootprintField->IsChecked() )
            fprintf( f, "%cfootprint", s_ExportSeparatorSymbol );

        for( ii = FIELD1; ii <= FIELD8; ii++ )
@@ -750,7 +757,9 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f, ListComponent* aL


/*********************************************************************************************/
int WinEDA_Build_BOM_Frame::PrintComponentsListByVal( FILE* f, ListComponent* aList, int aItemCount,
int WinEDA_Build_BOM_Frame::PrintComponentsListByVal( FILE* f,
                                                      ListComponent* aList,
                                                      int aItemCount,
                                                      bool aIncludeSubComponents )
/**********************************************************************************************/
{
+7 −7
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2008.01.25"
!define PRODUCT_VERSION "2008.06.15"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define COMPANY_NAME ""
!define TRADE_MARKS ""
@@ -118,8 +118,8 @@ Section $(TITLE_SEC01) SEC01
  File /nonfatal "..\doc_conv_orcad_to_kicad_spanish.txt"
  SetOutPath "$INSTDIR\template"
  File /nonfatal /r "..\template\*"
  SetOutPath "$INSTDIR\winexe"
  File /r "..\winexe\*"
  SetOutPath "$INSTDIR\bin"
  File /r "..\bin\*"
  SetOutPath "$INSTDIR\internat"
  File /r "..\internat\*"
SectionEnd
@@ -156,9 +156,9 @@ Section -CreateShortcuts
  CreateShortCut "$SMPROGRAMS\KiCad\Home Page.lnk" "$INSTDIR\HomePage.url"
  CreateShortCut "$SMPROGRAMS\KiCad\User Group.lnk" "$INSTDIR\UserGroup.url"
  CreateShortCut "$SMPROGRAMS\KiCad\Uninstall.lnk" "$INSTDIR\uninstaller.exe"
  CreateShortCut "$SMPROGRAMS\KiCad\KiCad.lnk" "$INSTDIR\winexe\kicad.exe"
  CreateShortCut "$SMPROGRAMS\KiCad\KiCad.lnk" "$INSTDIR\bin\kicad.exe"
  CreateShortCut "$SMPROGRAMS\KiCad\Wings3D.lnk" "$INSTDIR\Wings3D.url"
  CreateShortCut "$DESKTOP\KiCad.lnk" "$INSTDIR\winexe\kicad.exe"
  CreateShortCut "$DESKTOP\KiCad.lnk" "$INSTDIR\bin\kicad.exe"
SectionEnd

Section -CreateAddRemoveEntry
@@ -167,7 +167,7 @@ Section -CreateAddRemoveEntry
  WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "Publisher" "${COMPANY_NAME}"
  WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninstaller.exe"
  WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\winexe\kicad.exe"
  WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\kicad.exe"
  WriteRegDWORD ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "NoModify" "1"
  WriteRegDWORD ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "NoRepair" "1"
  WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "Comments" "${COMMENTS}"
@@ -221,7 +221,7 @@ Section Uninstall
  RMDir /r "$INSTDIR\library"
  RMDir /r "$INSTDIR\modules"
  RMDir /r "$INSTDIR\template"
  RMDir /r "$INSTDIR\winexe"
  RMDir /r "$INSTDIR\bin"
  RMDir /r "$INSTDIR\internat"
  RMDir /r "$INSTDIR\demos"
  RMDir /r "$INSTDIR\tutorial"
+178 −175
Original line number Diff line number Diff line
@@ -20,8 +20,7 @@

BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )

    COMMON_EVENTS_DRAWFRAME
    EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, WinEDA_PcbFrame::OnSockRequestServer )
COMMON_EVENTS_DRAWFRAME EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, WinEDA_PcbFrame::OnSockRequestServer )
EVT_SOCKET( ID_EDA_SOCKET_EVENT, WinEDA_PcbFrame::OnSockRequest )

EVT_KICAD_CHOICEBOX( ID_ON_ZOOM_SELECT, WinEDA_PcbFrame::OnSelectZoom )
@@ -174,7 +173,6 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
END_EVENT_TABLE()



///////****************************///////////:

/****************/
@@ -245,6 +243,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, WinEDA_App* parent,
    ReCreateOptToolbar();
}


/************************************/
WinEDA_PcbFrame::~WinEDA_PcbFrame()
/************************************/
@@ -380,7 +379,9 @@ void WinEDA_PcbFrame::SetToolbars()
        m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_DRC_OFF,
                                      !Drc_On );
        m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_DRC_OFF, Drc_On ?
            _( "DRC Off (Disable !!!), Currently: DRC is active" ) :
                                           _(
                                               "DRC Off (Disable !!!), Currently: DRC is active" )
                                           :
                                           _( "DRC On (Currently: DRC is inactive !!!)" ) );

        m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_MM,
@@ -407,7 +408,8 @@ void WinEDA_PcbFrame::SetToolbars()
                                      g_Show_Ratsnest );
        m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_RATSNEST,
                                           g_Show_Ratsnest ?
              _( "General ratsnest not show" ) : _( "Show General ratsnest" ) );
                                           _( "General ratsnest not show" ) : _(
                                               "Show General ratsnest" ) );

        m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
                                      g_Show_Module_Ratsnest );
@@ -567,15 +569,16 @@ void WinEDA_PcbFrame::SetToolbars()
    DisplayUnitsMsg();
}


/***********************************************************/
void WinEDA_PcbFrame::GetKicadAbout( wxCommandEvent& event )
/**********************************************************/
{
    wxString extra_message =
        wxT("\nPcbnew uses the kbool library \n");
    extra_message << wxT("version ") << wxT(KBOOL_VERSION)
    wxString extra_message;

    extra_message << wxT( "\nPcbnew uses the kbool library version " )
                  << wxT( KBOOL_VERSION )
                  << wxT( "\nsee http://boolean.klaasholwerda.nl/bool.html\n" );

    Print_Kicad_Infos( this, m_AboutTitle, extra_message );
}