diff --git a/change_log.txt b/change_log.txt index 4ef93ec0f6..9406a9e159 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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 +================================================================================ ++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 ================================================================================ +cvpcb: listboxes.cpp problem solved: Workaround for a curious bug in wxWidgets: diff --git a/cvpcb/listboxes.cpp b/cvpcb/listboxes.cpp index a4679f3f6f..9447fa4dec 100644 --- a/cvpcb/listboxes.cpp +++ b/cvpcb/listboxes.cpp @@ -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; diff --git a/eeschema/dialog_build_BOM.cpp b/eeschema/dialog_build_BOM.cpp index 366ff15174..e029ffb9bd 100644 --- a/eeschema/dialog_build_BOM.cpp +++ b/eeschema/dialog_build_BOM.cpp @@ -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; @@ -209,7 +212,7 @@ bool WinEDA_Build_BOM_Frame::Create( wxWindow* parent, wxWindowID id, const wxSt wxDialog::Create( parent, id, caption, pos, size, style ); CreateControls(); - if( GetSizer() ) + if (GetSizer()) { GetSizer()->SetSizeHints(this); } @@ -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) ); diff --git a/eeschema/dialog_build_BOM.h b/eeschema/dialog_build_BOM.h index 05f593617a..94e3a50b33 100644 --- a/eeschema/dialog_build_BOM.h +++ b/eeschema/dialog_build_BOM.h @@ -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; diff --git a/eeschema/dialog_build_BOM.pjd b/eeschema/dialog_build_BOM.pjd index 8cf5ac8b24..854edd3b3e 100644 --- a/eeschema/dialog_build_BOM.pjd +++ b/eeschema/dialog_build_BOM.pjd @@ -112,6 +112,7 @@ 1 0 1 + 0 @@ -447,6 +448,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX1" 10001 + "" "wxCheckBox" "wxCheckBox" 1 @@ -510,6 +512,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX2" 10002 + "" "wxCheckBox" "wxCheckBox" 1 @@ -573,6 +576,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX3" 10003 + "" "wxCheckBox" "wxCheckBox" 1 @@ -636,6 +640,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX4" 10004 + "" "wxCheckBox" "wxCheckBox" 1 @@ -699,6 +704,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX5" 10005 + "" "wxCheckBox" "wxCheckBox" 1 @@ -764,6 +770,7 @@ "wxEVT_COMMAND_RADIOBOX_SELECTED|OnRadioboxSelectFormatSelected|NONE||" "ID_RADIOBOX_SELECT_FORMAT" 10006 + "" "wxRadioBox" "wxRadioBox" 1 @@ -827,6 +834,7 @@ "wbRadioBoxProxy" "ID_RADIOBOX_SEPARATOR" 10007 + "" "wxRadioBox" "wxRadioBox" 1 @@ -924,6 +932,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX6" 10008 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1035,6 +1044,70 @@ 0 0 "<Any platform>" + + "wxCheckBox: ID_CHECKBOX_FOOTPRINT_FIELD" + "dialog-control-document" + "" + "checkbox" + 0 + 1 + 0 + 0 + "30/10/2007" + "wbCheckBoxProxy" + "ID_CHECKBOX_FOOTPRINT_FIELD" + 10018 + "" + "wxCheckBox" + "wxCheckBox" + 1 + 0 + "" + "" + "m_AddFootprintField" + "Add Footprint Field" + 0 + "" + "" + "s_Add_FpField_state" + "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 1 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + "wxCheckBox: ID_CHECKBOX_FIELD1" "dialog-control-document" @@ -1048,6 +1121,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD1" 10009 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1084,7 +1158,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1111,6 +1185,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD2" 10010 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1147,7 +1222,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1174,6 +1249,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD3" 10011 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1210,7 +1286,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1237,6 +1313,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD4" 10012 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1273,7 +1350,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1300,6 +1377,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD5" 10013 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1336,7 +1414,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1363,6 +1441,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD6" 10014 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1399,7 +1478,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1426,6 +1505,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD7" 10015 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1462,7 +1542,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1489,6 +1569,7 @@ "wbCheckBoxProxy" "ID_CHECKBOX_FIELD8" 10016 + "" "wxCheckBox" "wxCheckBox" 1 @@ -1525,7 +1606,7 @@ -1 -1 -1 - "Centre" + "Expand" "Centre" 0 5 @@ -1580,6 +1661,7 @@ "wxEVT_COMMAND_BUTTON_CLICKED|OnCreateListClick|NONE||" "ID_CREATE_LIST" 10017 + "" "wxButton" "wxButton" 1 @@ -1673,6 +1755,7 @@ "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||" "wxID_OK" 5100 + "" "wxButton" "wxButton" 1 @@ -1739,6 +1822,7 @@ "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||" "wxID_CANCEL" 5101 + "" "wxButton" "wxButton" 1 @@ -1805,6 +1889,7 @@ "wxEVT_COMMAND_BUTTON_CLICKED|OnApplyClick|NONE||" "wxID_APPLY" 5102 + "" "wxButton" "wxButton" 1 diff --git a/gerbview/gerbview.h b/gerbview/gerbview.h index af98e2a36a..c751cdd567 100644 --- a/gerbview/gerbview.h +++ b/gerbview/gerbview.h @@ -183,7 +183,7 @@ public: void Clear_D_CODE_Data(); }; -eda_global wxChar *g_GERBER_Tool_Type[6] +eda_global const wxChar *g_GERBER_Tool_Type[6] #ifdef MAIN = { wxT("????"), wxT("Rond"), wxT("Rect"), wxT("Line"), wxT("Oval"), wxT("Macro") } diff --git a/include/colors.h b/include/colors.h index 7244979af4..239a163463 100644 --- a/include/colors.h +++ b/include/colors.h @@ -51,7 +51,7 @@ class StructColors { public: unsigned char m_Blue, m_Green, m_Red, m_Numcolor; - wxChar* m_Name; + const wxChar* m_Name; int m_LightColor; }; diff --git a/include/wxstruct.h b/include/wxstruct.h index 6a642c3ed9..b85cf5276c 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -652,9 +652,8 @@ public: int Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone ); void Install_Test_DRC_Frame( wxDC* DC ); void Trace_Pcb( wxDC* DC, int mode ); - void Trace_PcbEdges( wxDC* DC, int mode_color ); - // Gestion des textes sur pcb + // Handling texts on the board void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); TEXTE_PCB* Create_Texte_Pcb( wxDC* DC ); void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); @@ -663,17 +662,17 @@ public: void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC, const wxPoint& pos ); - // Gestion des Segments type DRAWITEM + // Graphic Segments type DRAWSEGMENT void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); - // Gestion des modules (voir egalement WinEDA_BasePcbFrame) + // Footprint edition (see also WinEDA_BasePcbFrame) void StartMove_Module( MODULE* module, wxDC* DC ); bool Delete_Module( MODULE* module, wxDC* DC ); // loading modules: see WinEDA_BasePcbFrame - // Gestion du PCB + // Borad handling void Erase_Zones( wxDC* DC, bool query ); void Erase_Segments_Pcb( wxDC* DC, bool is_edges, bool query ); void Erase_Pistes( wxDC* DC, int masque_type, bool query ); diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 9646c3444a..24b70b8fbc 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -772,7 +772,7 @@ int D_PAD::WriteDescr( FILE* File ) { int cshape, NbLigne = 0;; - char* texttype; + const char* texttype; if( GetState( DELETED ) ) return NbLigne; diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index 2938dd35b2..4cf0a99cd6 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -1057,7 +1057,7 @@ void WinEDA_DrillFrame::GenDrillMap( int format ) break; } - /* Trace du contour ( couche EDGE ) */ + /* Draw items on edge layer */ PtStruct = m_Parent->m_Pcb->m_Drawings; for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext ) { @@ -1079,6 +1079,9 @@ void WinEDA_DrillFrame::GenDrillMap( int format ) PlotMirePcb( (MIREPCB*) PtStruct, format, EDGE_LAYER ); break; + case TYPEMARQUEUR: // do not draw + break; + default: DisplayError( this, wxT( "WinEDA_DrillFrame::GenDrillMap() : Unexpected Draw Type" ) ); break; diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 37d8c2db2f..fcf2594c31 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -19,10 +19,11 @@ /* class WinEDA_ModuleEditFrame */ /********************************/ BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, wxFrame ) -COMMON_EVENTS_DRAWFRAME EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, - ID_POPUP_PCB_ITEM_SELECTION_END, - WinEDA_BasePcbFrame::ProcessItemSelection ) -COMMON_EVENTS_DRAWFRAME EVT_CLOSE( WinEDA_ModuleEditFrame::OnCloseWindow ) +COMMON_EVENTS_DRAWFRAME +EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, + ID_POPUP_PCB_ITEM_SELECTION_END, + WinEDA_BasePcbFrame::ProcessItemSelection ) +EVT_CLOSE( WinEDA_ModuleEditFrame::OnCloseWindow ) EVT_SIZE( WinEDA_ModuleEditFrame::OnSize ) EVT_KICAD_CHOICEBOX( ID_ON_ZOOM_SELECT, WinEDA_PcbFrame::OnSelectZoom ) diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index 7b054c1480..e7b2102908 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -27,8 +27,7 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /**********************************************************************/ -/* Trace le PCB, et les elements complementaires ( axes, grille .. ) - * pour l'ecran actif et ses sous ecran +/* Draw the footprint editor BOARD, and others elements : axis, grid .. */ { @@ -47,6 +46,7 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) DrawPanel->DrawBackGround( DC ); TraceWorkSheet( DC, screen, 0 ); + /* Redraw the footprint */ Module = (MODULE*) m_Pcb->m_Modules; for( ; Module != NULL; Module = (MODULE*) Module->Pnext ) { @@ -58,7 +58,7 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) if( DrawPanel->ManageCurseur ) DrawPanel->ManageCurseur( DrawPanel, DC, FALSE ); - /* Reaffichage du curseur */ + /* Redraw the cursor */ DrawPanel->Trace_Curseur( DC ); screen->ClrRefreshReq(); @@ -69,8 +69,7 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /****************************************************************/ -/* Trace le PCB, et les elements complementaires ( axes, grille .. ) - * pour l'ecran actif et ses sous ecran +/* Draw the BOARD, and others elements : axis, grid .. */ { PCB_SCREEN* Screen = GetScreen(); @@ -90,20 +89,17 @@ void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) TraceWorkSheet( DC, GetScreen(), 0 ); Affiche_Status_Box(); - /* Reaffichage des curseurs */ - for( Screen = GetScreen(); Screen != NULL; Screen = Screen->Next() ) - { - if( DrawPanel->ManageCurseur ) - DrawPanel->ManageCurseur( DrawPanel, DC, FALSE ); - DrawPanel->Trace_Curseur( DC ); - } + if( DrawPanel->ManageCurseur ) + DrawPanel->ManageCurseur( DrawPanel, DC, FALSE ); + /* Redraw the cursor */ + DrawPanel->Trace_Curseur( DC ); } /****************************************************/ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode ) /****************************************************/ -/* Trace l'ensemble des elements du PCB sur l'ecran actif*/ +/* Redraw the BOARD items but not cursors, axis or grid */ { MARQUEUR* Marqueur; MODULE* Module; @@ -140,7 +136,7 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode ) Trace_Pads_Only( DrawPanel, DC, Module, 0, 0, MaskLay, mode ); } - /* Trace des elements particuliers de Drawings Pcb */ + /* Draw the graphic items */ PtStruct = m_Pcb->m_Drawings; for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext ) @@ -167,7 +163,11 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode ) Marqueur->Draw( DrawPanel, DC, mode ); break; - default: + case TYPEDRAWSEGMENT: + Trace_DrawSegmentPcb( DrawPanel, DC, (DRAWSEGMENT*) PtStruct, mode ); + break; + + default: break; } } @@ -184,28 +184,8 @@ void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode ) Trace_DrawSegmentPcb( DrawPanel, DC, segment, mode ); } - Trace_PcbEdges( DC, mode ); DrawGeneralRatsnest( DC ); m_CurrentScreen->ClrRefreshReq(); } - -/**************************************************************/ -void WinEDA_PcbFrame::Trace_PcbEdges( wxDC* DC, int mode_color ) -/**************************************************************/ -/* impression des contours ( edge pcb) : et draw */ -{ - EDA_BaseStruct* PtStruct; - - if( !m_Pcb ) - return; - for( PtStruct = m_Pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Pnext ) - { - if( PtStruct->m_Flags & IS_MOVED ) - continue; - if( PtStruct->Type() != TYPEDRAWSEGMENT ) - continue; - Trace_DrawSegmentPcb( DrawPanel, DC, (DRAWSEGMENT*) PtStruct, mode_color ); - } -}