Commit a67a4f7e authored by CHARRAS's avatar CHARRAS
Browse files

listboxes.cpp problem: apply to window version only. Some other very minor...

listboxes.cpp problem: apply to window version only. Some other very minor enhancements and bug fixes
parent 58c51a6f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -4,6 +4,17 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with 
email address.

2007-Oct-30 UPDATE  Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+cvpcb: listboxes.cpp problem solved: exists only under windows
	now apply to windows only, because this Workaround creates a problem undex linux 

+others:
	some very minor problems solved
	
+eeschema:
	in B.O.M.: the footprint field can be added to the field list

2007-Oct-29 UPDATE  Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+cvpcb: listboxes.cpp problem solved: Workaround for a curious bug in wxWidgets:
+2 −1
Original line number Diff line number Diff line
@@ -406,6 +406,7 @@ void FootprintListBox::SetActiveFootprintList( bool FullList, bool Redraw )
{
    bool old_selection = m_UseFootprintFullList;

#ifdef __WINDOWS__
    /* Workaround for a curious bug in wxWidgets:
     *  if we switch from a long list of footprints to a short list (a filtered footprint list),
     *  and if the selected item is near the end of the long list,
@@ -419,7 +420,7 @@ void FootprintListBox::SetActiveFootprintList( bool FullList, bool Redraw )
		if( new_selection != old_selection )
			SetSelection( 0, TRUE );
	}

#endif
    if( FullList )
    {
        m_UseFootprintFullList = TRUE;
+32 −24
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ static bool s_ListBySheet;
static bool s_BrowsList;
static int s_OutputFormOpt;
static int s_OutputSeparatorOpt;
static bool s_Add_FpField_state;
static bool s_Add_F1_state;
static bool s_Add_F2_state;
static bool s_Add_F3_state;
@@ -85,6 +86,7 @@ static bool s_Add_F6_state;
static bool s_Add_F7_state;
static bool s_Add_F8_state;
static bool * s_AddFieldList[] = {
	& s_Add_FpField_state,
	& s_Add_F1_state,
	& s_Add_F2_state,
	& s_Add_F3_state,
@@ -194,6 +196,7 @@ bool WinEDA_Build_BOM_Frame::Create( wxWindow* parent, wxWindowID id, const wxSt
    m_OutputSeparatorCtrl = NULL;
    m_GetListBrowser = NULL;
    m_FieldsToAppendListSizer = NULL;
    m_AddFootprintField = NULL;
    m_AddField1 = NULL;
    m_AddField2 = NULL;
    m_AddField3 = NULL;
@@ -227,7 +230,7 @@ void WinEDA_Build_BOM_Frame::CreateControls()
	SetFont(*g_DialogFont);
	
////@begin WinEDA_Build_BOM_Frame content construction
    // Generated by DialogBlocks, 13/10/2007 00:04:07 (unregistered)
    // Generated by DialogBlocks, 30/10/2007 12:13:46 (unregistered)

    WinEDA_Build_BOM_Frame* itemDialog1 = this;

@@ -294,58 +297,62 @@ void WinEDA_Build_BOM_Frame::CreateControls()
    m_FieldsToAppendListSizer = new wxStaticBoxSizer(itemStaticBoxSizer16Static, wxVERTICAL);
    itemBoxSizer15->Add(m_FieldsToAppendListSizer, 0, wxALIGN_LEFT|wxALL, 5);

    m_AddFootprintField = new wxCheckBox( itemDialog1, ID_CHECKBOX_FOOTPRINT_FIELD, _("Add Footprint Field"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddFootprintField->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddFootprintField, 0, wxGROW|wxALL, 5);

    m_AddField1 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD1, _("Add Field 1"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField1->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField1, 0, wxGROW|wxALL, 5);

    m_AddField2 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD2, _("Add Field 2"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField2->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField2, 0, wxGROW|wxALL, 5);

    m_AddField3 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD3, _("Add Field 3"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField3->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField3, 0, wxGROW|wxALL, 5);

    m_AddField4 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD4, _("Add Field 4"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField4->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField4, 0, wxGROW|wxALL, 5);

    m_AddField5 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD5, _("Add Field 5"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField5->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField5, 0, wxGROW|wxALL, 5);

    m_AddField6 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD6, _("Add Field 6"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField6->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField6, 0, wxGROW|wxALL, 5);

    m_AddField7 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD7, _("Add Field 7"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField7->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField7, 0, wxGROW|wxALL, 5);

    m_AddField8 = new wxCheckBox( itemDialog1, ID_CHECKBOX_FIELD8, _("Add Field 8"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
    m_AddField8->SetValue(false);
    m_FieldsToAppendListSizer->Add(m_AddField8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    m_FieldsToAppendListSizer->Add(m_AddField8, 0, wxGROW|wxALL, 5);

    itemBoxSizer15->Add(5, 5, 0, wxGROW|wxALL, 10);

    wxButton* itemButton26 = new wxButton( itemDialog1, ID_CREATE_LIST, _("Create &List"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton26->SetDefault();
    itemButton26->SetForegroundColour(wxColour(166, 0, 0));
    itemBoxSizer15->Add(itemButton26, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    wxButton* itemButton27 = new wxButton( itemDialog1, ID_CREATE_LIST, _("Create &List"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton27->SetDefault();
    itemButton27->SetForegroundColour(wxColour(166, 0, 0));
    itemBoxSizer15->Add(itemButton27, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);

    wxBoxSizer* itemBoxSizer27 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(itemBoxSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
    wxBoxSizer* itemBoxSizer28 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(itemBoxSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);

    wxButton* itemButton28 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton28->SetForegroundColour(wxColour(255, 0, 0));
    itemBoxSizer27->Add(itemButton28, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxButton* itemButton29 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton29->SetForegroundColour(wxColour(255, 0, 0));
    itemBoxSizer28->Add(itemButton29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton29 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton29->SetForegroundColour(wxColour(0, 0, 255));
    itemBoxSizer27->Add(itemButton29, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxButton* itemButton30 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton30->SetForegroundColour(wxColour(0, 0, 255));
    itemBoxSizer28->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton30 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer27->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxButton* itemButton31 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer28->Add(itemButton31, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    // Set validators
    m_ListCmpbyRefItems->SetValidator( wxGenericValidator(& s_ListByRef) );
@@ -356,6 +363,7 @@ void WinEDA_Build_BOM_Frame::CreateControls()
    m_OutputFormCtrl->SetValidator( wxGenericValidator(& s_OutputFormOpt) );
    m_OutputSeparatorCtrl->SetValidator( wxGenericValidator(& s_OutputSeparatorOpt) );
    m_GetListBrowser->SetValidator( wxGenericValidator(& s_BrowsList) );
    m_AddFootprintField->SetValidator( wxGenericValidator(& s_Add_FpField_state) );
    m_AddField1->SetValidator( wxGenericValidator(& s_Add_F1_state) );
    m_AddField2->SetValidator( wxGenericValidator(& s_Add_F2_state) );
    m_AddField3->SetValidator( wxGenericValidator(& s_Add_F3_state) );
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#define ID_RADIOBOX_SELECT_FORMAT 10006
#define ID_RADIOBOX_SEPARATOR 10007
#define ID_CHECKBOX6 10008
#define ID_CHECKBOX_FOOTPRINT_FIELD 10018
#define ID_CHECKBOX_FIELD1 10009
#define ID_CHECKBOX_FIELD2 10010
#define ID_CHECKBOX_FIELD3 10011
@@ -149,6 +150,7 @@ public:
    wxRadioBox* m_OutputSeparatorCtrl;
    wxCheckBox* m_GetListBrowser;
    wxStaticBoxSizer* m_FieldsToAppendListSizer;
    wxCheckBox* m_AddFootprintField;
    wxCheckBox* m_AddField1;
    wxCheckBox* m_AddField2;
    wxCheckBox* m_AddField3;
+93 −8

File changed.

Preview size limit exceeded, changes collapsed.

Loading