From 3104b5d885c82f04852a09943ac7667424871444 Mon Sep 17 00:00:00 2001 From: CHARRAS Date: Thu, 20 Dec 2007 22:27:32 +0000 Subject: [PATCH] bug in cvpcb --- cvpcb/readschematicnetlist.cpp | 2 +- include/wxstruct.h | 2 +- internat/fr/kicad.mo | Bin 138298 -> 138257 bytes internat/fr/kicad.po | 6 +- pcbnew/dialog_zones_by_polygon.cpp | 133 +++++++++++++++++------------ pcbnew/dialog_zones_by_polygon.h | 16 +++- pcbnew/dialog_zones_by_polygon.pjd | 115 ++++++++++++++++++++++--- pcbnew/onleftclick.cpp | 4 +- pcbnew/zones_by_polygon.cpp | 65 +++++++++----- 9 files changed, 244 insertions(+), 99 deletions(-) diff --git a/cvpcb/readschematicnetlist.cpp b/cvpcb/readschematicnetlist.cpp index d5401281b6..d09b618d60 100644 --- a/cvpcb/readschematicnetlist.cpp +++ b/cvpcb/readschematicnetlist.cpp @@ -116,6 +116,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() /* i points the beginning of the schematic time stamp */ + memset( schematic_timestamp, 0, sizeof(schematic_timestamp) ); j = 0; while( Line[i] != ' ' ) schematic_timestamp[j++] = Line[i++]; @@ -128,7 +129,6 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist() /* i points the component value */ LibName = Line + i; - memset( schematic_timestamp, 0, sizeof(schematic_timestamp) ); memset( component_reference, 0, sizeof(component_reference) ); memset( footprint_name, 0, sizeof(footprint_name) ); memset( component_value, 0, sizeof(component_value) ); diff --git a/include/wxstruct.h b/include/wxstruct.h index 69d78a1a2b..65b0477c4f 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -751,7 +751,7 @@ public: // zone handling EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone ); void CaptureNetName( wxDC* DC ); - EDGE_ZONE* Begin_Zone(); + EDGE_ZONE* Begin_Zone( wxDC* DC ); /** * Function End_Zone diff --git a/internat/fr/kicad.mo b/internat/fr/kicad.mo index fd9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n;mouc0^T2K0jY7TqI1qx~Lht51|=&9tj|uc_SJ&ggek( z`V+clr4A+Qqnocg+F@Vxy&^P_322}T(12EtevQ8OCwk+RIFjn+(50)422dA0EltrSxD>rHr=Z{6eI%P2X3^leo{J9n zDmu`5%*S0}3I4T#@6`{_L?UU!IW)5H_dnG zF)5x`ESK75_I_v}1HXK;@1~8LEaZLG$o5bjdD4Col-z^~2D=114Z4&;Rsjn2#Ql zCFqT|7ES4Q=!ZX{0~aru+AE*~R7KkxhHcPHbwxMdC76f((WM)J2AajJH`pu+E%8}& zhF@Yn9u8}jDwg}NRb8+V?Kff*d>lLC2iO`*l`fY1r`(QsGWCJz@BQQGIBU_pv=!^) zPo;}xb1AP{Ce6Ga=JTLE`oYEM+KoVGI0ntgB=r1G4etvd3ZDoUhcAb#!}r2Z%4AbV zTWGN3uj9eK@YnF~uvFRfe#Nj__z(2^reT}#^ub_M66ZF*VM)yjwa%pWFpr@z@x|s{mln+LC|IO&0n2h$Hokqc5zX#A4UqW~P zIxN7i&|kq*jxLt_UrNoxTd42Gws_Ss#WGXy0Xz%qmQMo|p#cm>1G*Uvd}jCrvI(=9 z<*AVQ0R3Pmy0$-}SLp9(h7O}CE?%Kn?r*|!XuTDhu?|r`6aD^Q=q|q)?dQ5^9~s_+ zx&QsoZ4?}M7MhaB&J6IF`7Y$@Tn!;bv<98@5TQOy_de{LCupjzEU}`Uw>w+cKNM3bZXPOX{*+)T9xfx zIQshL7mg|%HhO5`^}|PX$}bv`f7Rf^QKJe+=XWl;rf^vE5ksySHR_rc(b#Rsun~h= h3>?+v\n" +"PO-Revision-Date: 2007-12-20 23:05+0100\n" +"Last-Translator: \n" "Language-Team: kicad team \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" @@ -3606,7 +3606,7 @@ msgstr "S #: pcbnew/netlist.cpp:945 #, c-format msgid "Component [%s]: footprint <%s> not found" -msgstr "Composant [%s]: Module <%sw non trouvé en librairies" +msgstr "Composant [%s]: Module <%s> non trouvé en librairie" #: pcbnew/editmod.cpp:144 msgid "Text is REFERENCE!" diff --git a/pcbnew/dialog_zones_by_polygon.cpp b/pcbnew/dialog_zones_by_polygon.cpp index 8fc239fee6..761402b778 100644 --- a/pcbnew/dialog_zones_by_polygon.cpp +++ b/pcbnew/dialog_zones_by_polygon.cpp @@ -48,7 +48,7 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_ZoneFrame, wxDialog ) BEGIN_EVENT_TABLE( WinEDA_ZoneFrame, wxDialog ) ////@begin WinEDA_ZoneFrame event table entries - EVT_BUTTON( ID_BUTTON, WinEDA_ZoneFrame::ExecFillZone ) + EVT_BUTTON( wxID_OK, WinEDA_ZoneFrame::OnOkClick ) EVT_BUTTON( wxID_CANCEL, WinEDA_ZoneFrame::OnCancelClick ) @@ -75,7 +75,14 @@ WinEDA_ZoneFrame::WinEDA_ZoneFrame( WinEDA_PcbFrame* parent, long style ) { m_Parent = parent; + + if( m_Parent->m_Parent->m_EDA_Config ) + { + m_NetSorting = m_Parent->m_Parent->m_EDA_Config->Read( ZONE_NET_SORT_OPTION_KEY, (long) BOARD::PAD_CNT_SORT ); + } + Create( parent, id, caption, pos, size, style ); + SetReturnCode(ZONE_ABORT); // Will be changed on buttons click } @@ -91,16 +98,18 @@ bool WinEDA_ZoneFrame::Create( wxWindow* parent, long style ) { ////@begin WinEDA_ZoneFrame member initialisation + m_OutlinesOpt = 0; m_GridCtrl = NULL; m_ClearanceValueTitle = NULL; m_ZoneClearanceCtrl = NULL; + m_OutlineAppearanceCtrl = NULL; m_FillOpt = NULL; m_OrientEdgesOpt = NULL; m_NetSortingOption = NULL; m_ListNetNameSelection = NULL; m_LayerSelectionCtrl = NULL; ////@end WinEDA_ZoneFrame member initialisation - + ////@begin WinEDA_ZoneFrame creation SetExtraStyle(wxWS_EX_BLOCK_EVENTS); wxDialog::Create( parent, id, caption, pos, size, style ); @@ -126,7 +135,7 @@ void WinEDA_ZoneFrame::CreateControls() SetFont( *g_DialogFont ); ////@begin WinEDA_ZoneFrame content construction - // Generated by DialogBlocks, 17/12/2007 20:46:19 (unregistered) + // Generated by DialogBlocks, 20/12/2007 15:46:22 (unregistered) WinEDA_ZoneFrame* itemDialog1 = this; @@ -143,8 +152,7 @@ void WinEDA_ZoneFrame::CreateControls() m_GridCtrlStrings.Add(_("0.00000")); m_GridCtrlStrings.Add(_("0.00000")); m_GridCtrlStrings.Add(_("0.00000")); - m_GridCtrlStrings.Add(_("0.00000")); - m_GridCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX3, _("Grid Size for Filling:"), wxDefaultPosition, wxDefaultSize, m_GridCtrlStrings, 1, wxRA_SPECIFY_COLS ); + m_GridCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX_GRID_SELECTION, _("Grid Size for Filling:"), wxDefaultPosition, wxDefaultSize, m_GridCtrlStrings, 1, wxRA_SPECIFY_COLS ); m_GridCtrl->SetSelection(0); itemBoxSizer4->Add(m_GridCtrl, 0, wxGROW|wxALL, 5); @@ -154,10 +162,18 @@ void WinEDA_ZoneFrame::CreateControls() m_ZoneClearanceCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer4->Add(m_ZoneClearanceCtrl, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); + wxArrayString m_OutlineAppearanceCtrlStrings; + m_OutlineAppearanceCtrlStrings.Add(_("Line")); + m_OutlineAppearanceCtrlStrings.Add(_("Hatched Outline")); + m_OutlineAppearanceCtrlStrings.Add(_("Full Hatched")); + m_OutlineAppearanceCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX_OUTLINES_OPTION, _("Outlines Appearance"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlStrings, 1, wxRA_SPECIFY_COLS ); + m_OutlineAppearanceCtrl->SetSelection(0); + itemBoxSizer4->Add(m_OutlineAppearanceCtrl, 0, wxGROW|wxALL, 5); + itemBoxSizer3->Add(5, 5, 0, wxGROW|wxALL, 5); - wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer9, 0, wxGROW|wxALL, 5); + wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer3->Add(itemBoxSizer10, 0, wxGROW|wxALL, 5); wxArrayString m_FillOptStrings; m_FillOptStrings.Add(_("Include Pads")); @@ -165,57 +181,58 @@ void WinEDA_ZoneFrame::CreateControls() m_FillOptStrings.Add(_("Exclude Pads")); m_FillOpt = new wxRadioBox( itemDialog1, ID_RADIOBOX4, _("Pad options:"), wxDefaultPosition, wxDefaultSize, m_FillOptStrings, 1, wxRA_SPECIFY_COLS ); m_FillOpt->SetSelection(0); - itemBoxSizer9->Add(m_FillOpt, 0, wxGROW|wxALL, 5); + itemBoxSizer10->Add(m_FillOpt, 0, wxGROW|wxALL, 5); + + itemBoxSizer10->Add(5, 5, 1, wxGROW|wxALL, 5); wxArrayString m_OrientEdgesOptStrings; m_OrientEdgesOptStrings.Add(_("Any")); m_OrientEdgesOptStrings.Add(_("H , V and 45 deg")); m_OrientEdgesOpt = new wxRadioBox( itemDialog1, ID_RADIOBOX5, _("Zone edges orient:"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptStrings, 1, wxRA_SPECIFY_COLS ); m_OrientEdgesOpt->SetSelection(0); - itemBoxSizer9->Add(m_OrientEdgesOpt, 0, wxGROW|wxALL, 5); + itemBoxSizer10->Add(m_OrientEdgesOpt, 0, wxGROW|wxALL, 5); itemBoxSizer3->Add(5, 5, 0, wxGROW|wxALL, 5); - wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer13, 0, wxGROW|wxALL, 5); + wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer3->Add(itemBoxSizer15, 0, wxGROW|wxALL, 5); - wxButton* itemButton14 = new wxButton( itemDialog1, ID_BUTTON, _("Fill"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton14->SetDefault(); - itemButton14->SetForegroundColour(wxColour(204, 0, 0)); - itemBoxSizer13->Add(itemButton14, 0, wxGROW|wxALL, 5); + wxButton* itemButton16 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer15->Add(itemButton16, 0, wxGROW|wxALL, 5); - wxButton* itemButton15 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton15->SetForegroundColour(wxColour(0, 0, 255)); - itemBoxSizer13->Add(itemButton15, 0, wxGROW|wxALL, 5); + wxButton* itemButton17 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton17->SetForegroundColour(wxColour(0, 0, 255)); + itemBoxSizer15->Add(itemButton17, 0, wxGROW|wxALL, 5); - itemBoxSizer13->Add(5, 5, 1, wxGROW|wxALL, 5); + itemBoxSizer15->Add(5, 5, 1, wxGROW|wxALL, 5); wxArrayString m_NetSortingOptionStrings; m_NetSortingOptionStrings.Add(_("Alphabetic")); m_NetSortingOptionStrings.Add(_("Advanced")); m_NetSortingOption = new wxRadioBox( itemDialog1, ID_NET_SORTING_OPTION, _("Net sorting:"), wxDefaultPosition, wxDefaultSize, m_NetSortingOptionStrings, 1, wxRA_SPECIFY_COLS ); m_NetSortingOption->SetSelection(0); - itemBoxSizer13->Add(m_NetSortingOption, 0, wxGROW|wxALL, 5); + itemBoxSizer15->Add(m_NetSortingOption, 0, wxGROW|wxALL, 5); - wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer2->Add(itemBoxSizer18, 0, wxGROW|wxALL, 5); + wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer2->Add(itemBoxSizer20, 0, wxGROW|wxALL, 5); - wxStaticText* itemStaticText19 = new wxStaticText( itemDialog1, wxID_STATIC, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer18->Add(itemStaticText19, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + wxStaticText* itemStaticText21 = new wxStaticText( itemDialog1, wxID_STATIC, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer20->Add(itemStaticText21, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxArrayString m_ListNetNameSelectionStrings; m_ListNetNameSelection = new wxListBox( itemDialog1, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, m_ListNetNameSelectionStrings, wxLB_SINGLE|wxSUNKEN_BORDER ); - itemBoxSizer18->Add(m_ListNetNameSelection, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); + itemBoxSizer20->Add(m_ListNetNameSelection, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); - wxStaticText* itemStaticText21 = new wxStaticText( itemDialog1, wxID_LAYER_SELECTION, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer18->Add(itemStaticText21, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + wxStaticText* itemStaticText23 = new wxStaticText( itemDialog1, wxID_LAYER_SELECTION, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer20->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxArrayString m_LayerSelectionCtrlStrings; m_LayerSelectionCtrl = new wxListBox( itemDialog1, ID_LAYER_CHOICE, wxDefaultPosition, wxDefaultSize, m_LayerSelectionCtrlStrings, wxLB_SINGLE ); - itemBoxSizer18->Add(m_LayerSelectionCtrl, 0, wxGROW|wxALL, 5); + itemBoxSizer20->Add(m_LayerSelectionCtrl, 0, wxGROW|wxALL, 5); // Set validators - m_NetSortingOption->SetValidator( wxGenericValidator(& s_NetSortingOpt) ); + m_OutlineAppearanceCtrl->SetValidator( wxGenericValidator(& m_OutlinesOpt) ); + m_NetSortingOption->SetValidator( wxGenericValidator(& m_NetSorting) ); ////@end WinEDA_ZoneFrame content construction wxString title = _( "Zone clearance value:" ) + ReturnUnitSymbol( g_UnitMetric ); m_ClearanceValueTitle->SetLabel( title ); @@ -233,7 +250,7 @@ void WinEDA_ZoneFrame::CreateControls() if( Zone_45_Only ) m_OrientEdgesOpt->SetSelection( 1 ); - static const int GridList[4] = { 50, 100, 250, 500 }; + static const int GridList[4] = { 50, 100, 250 }; int selection = 0; for( unsigned ii = 0; ii < (unsigned) m_GridCtrl->GetCount(); ii++ ) @@ -257,7 +274,7 @@ void WinEDA_ZoneFrame::CreateControls() m_FillOpt->SetSelection( 2 ); } - m_NetSortingOption->SetSelection(s_NetSortingOpt == 0 ? : 1 ); + m_NetSortingOption->SetSelection(m_NetSorting == 0 ? 0 : 1 ); int layer_cnt = g_DesignSettings.m_CopperLayerCount; for( int ii = 0; ii < g_DesignSettings.m_CopperLayerCount; ii++ ) @@ -277,7 +294,7 @@ void WinEDA_ZoneFrame::CreateControls() wxArrayString ListNetName; m_Parent->m_Pcb->ReturnSortedNetnamesList( ListNetName, - s_NetSortingOpt == 0 ? BOARD::ALPHA_SORT : BOARD::PAD_CNT_SORT ); + m_NetSorting == 0 ? BOARD::ALPHA_SORT : BOARD::PAD_CNT_SORT ); m_ListNetNameSelection->InsertItems( ListNetName, 0 ); // Select net: @@ -343,19 +360,16 @@ wxIcon WinEDA_ZoneFrame::GetIconResource( const wxString& name ) void WinEDA_ZoneFrame::OnCancelClick( wxCommandEvent& event ) { -////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_ZoneFrame. - // Before editing this code, remove the block markers. - event.Skip(); -////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_ZoneFrame. + EndModal( ZONE_ABORT ); } -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON2 +/**********************************************************/ +bool WinEDA_ZoneFrame::AcceptOptions(bool aPromptForErrors) +/**********************************************************/ +/** Function WinEDA_ZoneFrame::AcceptOptions( + * @return false if incorrect options, true if Ok. */ -/***********************************************************/ -void WinEDA_ZoneFrame::ExecFillZone( wxCommandEvent& event ) -/***********************************************************/ { switch( m_FillOpt->GetSelection() ) { @@ -385,13 +399,10 @@ void WinEDA_ZoneFrame::ExecFillZone( wxCommandEvent& event ) g_GridRoutingSize = 100; break; + default: case 2: g_GridRoutingSize = 250; break; - - case 3: - g_GridRoutingSize = 500; - break; } wxString txtvalue = m_ZoneClearanceCtrl->GetValue(); @@ -404,19 +415,19 @@ void WinEDA_ZoneFrame::ExecFillZone( wxCommandEvent& event ) /* Get the layer selection for this zone */ int ii = m_LayerSelectionCtrl->GetSelection(); - if( ii < 0 ) + if( ii < 0 && aPromptForErrors ) { DisplayError( this, _( "Error : you must choose a layer" ) ); - return; + return false; } s_Zone_Layer = m_LayerId[ii]; /* Get the net name selection for this zone */ ii = m_ListNetNameSelection->GetSelection(); - if( ii < 0 ) + if( ii < 0 && aPromptForErrors ) { DisplayError( this, _( "Error : you must choose a net name" ) ); - return; + return false; } wxString net_name = m_ListNetNameSelection->GetString( ii ); @@ -432,8 +443,8 @@ void WinEDA_ZoneFrame::ExecFillZone( wxCommandEvent& event ) break; } } - - EndModal( 0 ); + + return true; } @@ -444,10 +455,26 @@ void WinEDA_ZoneFrame::ExecFillZone( wxCommandEvent& event ) void WinEDA_ZoneFrame::OnNetSortingOptionSelected( wxCommandEvent& event ) { wxArrayString ListNetName; - s_NetSortingOpt = m_NetSortingOption->GetSelection(); + m_NetSorting = m_NetSortingOption->GetSelection(); m_Parent->m_Pcb->ReturnSortedNetnamesList( ListNetName, - s_NetSortingOpt == 0 ? BOARD::ALPHA_SORT : BOARD::PAD_CNT_SORT ); + m_NetSorting == 0 ? BOARD::ALPHA_SORT : BOARD::PAD_CNT_SORT ); m_ListNetNameSelection->Clear(); m_ListNetNameSelection->InsertItems( ListNetName, 0 ); + if( m_Parent->m_Parent->m_EDA_Config ) + { + m_Parent->m_Parent->m_EDA_Config->Write( ZONE_NET_SORT_OPTION_KEY, (long) m_NetSorting ); + } + +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK + */ + +void WinEDA_ZoneFrame::OnOkClick( wxCommandEvent& event ) +{ + if ( AcceptOptions(true) ) + EndModal( ZONE_OK ); } diff --git a/pcbnew/dialog_zones_by_polygon.h b/pcbnew/dialog_zones_by_polygon.h index 5ed9c26b58..c5cce26e9b 100644 --- a/pcbnew/dialog_zones_by_polygon.h +++ b/pcbnew/dialog_zones_by_polygon.h @@ -39,11 +39,11 @@ ////@begin control identifiers #define ID_DIALOG 10000 -#define ID_RADIOBOX3 10003 +#define ID_RADIOBOX_GRID_SELECTION 10003 #define ID_TEXTCTRL1 10007 +#define ID_RADIOBOX_OUTLINES_OPTION 10006 #define ID_RADIOBOX4 10008 #define ID_RADIOBOX5 10009 -#define ID_BUTTON 10010 #define ID_NET_SORTING_OPTION 10005 #define ID_NETNAME_SELECTION 10001 #define wxID_LAYER_SELECTION 10004 @@ -85,8 +85,8 @@ public: ////@begin WinEDA_ZoneFrame event handler declarations - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON - void ExecFillZone( wxCommandEvent& event ); + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK + void OnOkClick( wxCommandEvent& event ); /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL void OnCancelClick( wxCommandEvent& event ); @@ -98,6 +98,9 @@ public: ////@begin WinEDA_ZoneFrame member function declarations + int GetOutlinesOpt() const { return m_OutlinesOpt ; } + void SetOutlinesOpt(int value) { m_OutlinesOpt = value ; } + /// Retrieves bitmap resources wxBitmap GetBitmapResource( const wxString& name ); @@ -108,20 +111,25 @@ public: /// Should we show tooltips? static bool ShowToolTips(); + bool AcceptOptions(bool aPromptForErrors); + ////@begin WinEDA_ZoneFrame member variables wxRadioBox* m_GridCtrl; wxStaticText* m_ClearanceValueTitle; wxTextCtrl* m_ZoneClearanceCtrl; + wxRadioBox* m_OutlineAppearanceCtrl; wxRadioBox* m_FillOpt; wxRadioBox* m_OrientEdgesOpt; wxRadioBox* m_NetSortingOption; wxListBox* m_ListNetNameSelection; wxListBox* m_LayerSelectionCtrl; + int m_OutlinesOpt; ////@end WinEDA_ZoneFrame member variables WinEDA_PcbFrame * m_Parent; + int m_NetSorting; int m_LayerId[LAYER_COUNT]; // Handle the real layer number from layer name position in m_LayerSelectionCtrl }; diff --git a/pcbnew/dialog_zones_by_polygon.pjd b/pcbnew/dialog_zones_by_polygon.pjd index 8aa3df2c97..54bd36a53e 100644 --- a/pcbnew/dialog_zones_by_polygon.pjd +++ b/pcbnew/dialog_zones_by_polygon.pjd @@ -218,6 +218,7 @@ "" 0 0 + "m_OutlinesOpt|int|OutlinesOpt|0|0|0|" "ID_DIALOG" 10000 "WinEDA_ZoneFrame" @@ -346,7 +347,7 @@ 0 "<Any platform>" - "wxRadioBox: ID_RADIOBOX3" + "wxRadioBox: ID_RADIOBOX_GRID_SELECTION" "dialog-control-document" "" "radiobox" @@ -356,7 +357,7 @@ 0 "15/12/2007" "wbRadioBoxProxy" - "ID_RADIOBOX3" + "ID_RADIOBOX_GRID_SELECTION" 10003 "" "wxRadioBox" @@ -368,7 +369,7 @@ "m_GridCtrl" "Grid Size for Filling:" 1 - "0.00000|0.00000|0.00000|0.00000" + "0.00000|0.00000|0.00000" 0 "" "" @@ -561,6 +562,70 @@ "" "" + + "wxRadioBox: ID_RADIOBOX_OUTLINES_OPTION" + "dialog-control-document" + "" + "radiobox" + 0 + 1 + 0 + 0 + "20/12/2007" + "wbRadioBoxProxy" + "ID_RADIOBOX_OUTLINES_OPTION" + 10006 + "" + "wxRadioBox" + "wxRadioBox" + 1 + 0 + "" + "" + "m_OutlineAppearanceCtrl" + "Outlines Appearance" + 1 + "Line|Hatched Outline|Full Hatched" + 0 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "m_OutlinesOpt" + "wxGenericValidator(& %VARIABLE%)" + "" + "" + "" + "" + "" + 0 + 1 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + "Spacer" @@ -677,6 +742,32 @@ "" "" + + "Spacer" + "dialog-control-document" + "" + "spacer" + 0 + 1 + 0 + 0 + "18/12/2007" + "wbSpacerProxy" + 5 + 5 + "Expand" + "Expand" + 1 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "<Any platform>" + "wxRadioBox: ID_RADIOBOX5" "dialog-control-document" @@ -794,7 +885,7 @@ 0 "<Any platform>" - "wxButton: ID_BUTTON" + "wxButton: wxID_OK" "dialog-control-document" "" "dialogcontrol" @@ -802,11 +893,11 @@ 1 0 0 - "15/12/2007" + "18/12/2007" "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|ExecFillZone|||WinEDA_ZoneFrame" - "ID_BUTTON" - 10010 + "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||WinEDA_ZoneFrame" + "wxID_OK" + 5100 "" "wxButton" "wxButton" @@ -815,8 +906,8 @@ "" "" "" - "Fill" - 1 + "OK" + 0 "" "" "" @@ -827,7 +918,7 @@ "" "" "" - "CC0000" + "" "" 0 1 @@ -987,7 +1078,7 @@ 0 1 "<Any platform>" - "s_NetSortingOpt" + "m_NetSorting" "wxGenericValidator(& %VARIABLE%)" "" "" diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 964343c619..a632da9216 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -215,13 +215,13 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) case ID_PCB_ZONES_BUTT: if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) ) { - SetCurItem( DrawStruct = Begin_Zone() ); + SetCurItem( DrawStruct = Begin_Zone( DC ) ); } else if( DrawStruct && (DrawStruct->Type() == TYPEEDGEZONE) && (DrawStruct->m_Flags & IS_NEW) ) { - SetCurItem( DrawStruct = Begin_Zone() ); + SetCurItem( DrawStruct = Begin_Zone( DC ) ); } else DisplayError( this, wxT( "Edit: zone internal error" ) ); diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index b71a6f17ba..58cf883c7e 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -61,10 +61,13 @@ static bool Zone_Exclude_Pads = TRUE; static bool s_Zone_Create_Thermal_Relief = TRUE; static int s_Zone_Layer; // Layer used to put the current zone static int s_NetcodeSelection; // Net code selection for the current zone -static int s_NetSortingOpt; // For the net list: sort option (by alphabetic order or bay pad count order #define ZONE_NET_SORT_OPTION_KEY wxT("Zone_NetSort_Opt") +enum zone_cmd { + ZONE_ABORT, + ZONE_OK +}; #include "dialog_zones_by_polygon.cpp" @@ -348,12 +351,38 @@ void WinEDA_BasePcbFrame::DelLimitesZone( wxDC* DC, bool Redraw ) * either initializes the first segment of a new zone, or adds an * intermediate segment. */ -EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone() +EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC ) { EDGE_ZONE* oldedge; EDGE_ZONE* newedge = NULL; oldedge = m_Pcb->m_CurrentLimitZone; + + if( m_Pcb->m_CurrentLimitZone == NULL ) /* Start a new contour: init zone params (net and layer) */ + { + DrawPanel->m_IgnoreMouseEvents = TRUE; + WinEDA_ZoneFrame* frame = new WinEDA_ZoneFrame( this ); + + int diag = frame->ShowModal(); + frame->Destroy(); + DrawPanel->MouseToCursorSchema(); + DrawPanel->m_IgnoreMouseEvents = FALSE; + + if( diag == ZONE_ABORT ) + return NULL; + + GetScreen()->m_Active_Layer = s_Zone_Layer; + + /* Show the Net */ + if( (g_HightLigth_NetCode > 0) && (g_HightLigth_NetCode != s_NetcodeSelection) ) + { + Hight_Light( DC ); // Remove old hightlight selection + } + + g_HightLigth_NetCode = s_NetcodeSelection; + if ( ! g_HightLigt_Status ) + Hight_Light( DC ); + } // if first segment if( (m_Pcb->m_CurrentLimitZone == NULL ) /* debut reel du trace */ @@ -411,7 +440,7 @@ void WinEDA_PcbFrame::End_Zone( wxDC* DC ) if( m_Pcb->m_CurrentLimitZone ) { - Begin_Zone(); + Begin_Zone( DC ); /* le dernier point genere est de longueur tj nulle donc inutile. */ /* il sera raccorde au point de depart */ @@ -519,25 +548,15 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC ) return; } - if( m_Parent && m_Parent->m_EDA_Config ) - { - s_NetSortingOpt = m_Parent->m_EDA_Config->Read( ZONE_NET_SORT_OPTION_KEY, (long) BOARD::PAD_CNT_SORT ); - } - int NetSortingOptImg = s_NetSortingOpt; DrawPanel->m_IgnoreMouseEvents = TRUE; WinEDA_ZoneFrame* frame = new WinEDA_ZoneFrame( this ); - int abrd = frame->ShowModal(); + int diag = frame->ShowModal(); frame->Destroy(); DrawPanel->MouseToCursorSchema(); DrawPanel->m_IgnoreMouseEvents = FALSE; - if( (NetSortingOptImg != s_NetSortingOpt ) && m_Parent && m_Parent->m_EDA_Config ) - { - m_Parent->m_EDA_Config->Write( ZONE_NET_SORT_OPTION_KEY, (long) s_NetSortingOpt ); - } - - if( abrd ) + if( diag == ZONE_ABORT ) return; // set all the EDGE_ZONEs to the currently active layer and redraw them @@ -551,14 +570,15 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC ) Trace_DrawSegmentPcb( DrawPanel, DC, PtLim, GR_XOR ); } - /* Show the NetName */ + /* Show the Net */ if( (g_HightLigth_NetCode > 0) && (g_HightLigth_NetCode != s_NetcodeSelection) ) { - Hight_Light( DC ); - g_HightLigth_NetCode = s_NetcodeSelection; - Hight_Light( DC ); - } + Hight_Light( DC ); // Remoive old hightlight selection + } + g_HightLigth_NetCode = s_NetcodeSelection; + if ( ! g_HightLigt_Status ) + Hight_Light( DC ); if( g_HightLigth_NetCode > 0 ) { @@ -576,7 +596,6 @@ void WinEDA_PcbFrame::Fill_Zone( wxDC* DC ) Affiche_1_Parametre( this, 22, _( "NetName" ), msg, RED ); - Build_Zone( this, DC, g_HightLigth_NetCode, Zone_Exclude_Pads, s_Zone_Create_Thermal_Relief ); - - GetScreen()->SetModify(); + Build_Zone( this, DC, g_HightLigth_NetCode, Zone_Exclude_Pads, s_Zone_Create_Thermal_Relief ); + GetScreen()->SetModify(); }