diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 372113c0e6..08d53713b3 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -65,7 +65,7 @@ static const wxChar* s_allowedExtensionsToList[] = wxT( "^.*\\.pro$" ), wxT( "^.*\\.pdf$" ), wxT( "^[^$].*\\.brd$" ), // Legacy Pcbnew files - wxT( "^[^$].*\\.kicad_brd$" ), // S format Pcbnew files + wxT( "^[^$].*\\.kicad_pcb$" ), // S format Pcbnew files wxT( "^.*\\.net$" ), wxT( "^.*\\.txt$" ), wxT( "^.*\\.pho$" ), // Gerber file (Kicad extension) diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index a6517ccbc6..43d6bfb8d4 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -28,7 +28,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* fgSizerPadType; - fgSizerPadType = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizerPadType = new wxFlexGridSizer( 4, 2, 0, 0 ); fgSizerPadType->AddGrowableCol( 1 ); fgSizerPadType->SetFlexibleDirection( wxBOTH ); fgSizerPadType->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -49,19 +49,29 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_staticText44 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad type:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText44->Wrap( -1 ); - fgSizerPadType->Add( m_staticText44, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizerPadType->Add( m_staticText44, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); wxString m_PadTypeChoices[] = { _("Through-hole"), _("SMD"), _("Connector"), _("NPTH, Mechanical") }; int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString ); m_PadType = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 0 ); m_PadType->SetSelection( 0 ); - fgSizerPadType->Add( m_PadType, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizerPadType->Add( m_PadType, 0, wxEXPAND|wxALL, 5 ); + + m_staticText45 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText45->Wrap( -1 ); + fgSizerPadType->Add( m_staticText45, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal") }; + int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString ); + m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 ); + m_PadShape->SetSelection( 0 ); + fgSizerPadType->Add( m_PadShape, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_LeftBoxSizer->Add( fgSizerPadType, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxFlexGridSizer* fgSizerShapeType; - fgSizerShapeType = new wxFlexGridSizer( 0, 3, 0, 0 ); + fgSizerShapeType = new wxFlexGridSizer( 11, 3, 0, 0 ); fgSizerShapeType->AddGrowableCol( 1 ); fgSizerShapeType->SetFlexibleDirection( wxBOTH ); fgSizerShapeType->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -88,19 +98,6 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadPosY_Unit->Wrap( -1 ); fgSizerShapeType->Add( m_PadPosY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticText45 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText45->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText45, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal") }; - int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString ); - m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 ); - m_PadShape->SetSelection( 0 ); - fgSizerShapeType->Add( m_PadShape, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - fgSizerShapeType->Add( 0, 0, 0, wxEXPAND, 5 ); - m_staticText12 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText12->Wrap( -1 ); fgSizerShapeType->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); @@ -117,7 +114,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind fgSizerShapeType->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_ShapeSize_Y_Ctrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_ShapeSize_Y_Ctrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + fgSizerShapeType->Add( m_ShapeSize_Y_Ctrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_PadShapeSizeY_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadShapeSizeY_Unit->Wrap( -1 ); @@ -130,7 +127,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind wxString m_PadOrientChoices[] = { _("0"), _("90"), _("-90"), _("180"), _("Custom") }; int m_PadOrientNChoices = sizeof( m_PadOrientChoices ) / sizeof( wxString ); m_PadOrient = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadOrientNChoices, m_PadOrientChoices, 0 ); - m_PadOrient->SetSelection( 0 ); + m_PadOrient->SetSelection( 4 ); fgSizerShapeType->Add( m_PadOrient, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticText491 = new wxStaticText( m_panelGeneral, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -142,7 +139,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind fgSizerShapeType->Add( m_PadOrientText, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_PadOrientCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_PadOrientCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerShapeType->Add( m_PadOrientCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_customOrientUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("0.1 deg"), wxDefaultPosition, wxDefaultSize, 0 ); m_customOrientUnits->Wrap( -1 ); @@ -174,10 +171,10 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_staticText38->Wrap( -1 ); m_staticText38->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") ); - fgSizerShapeType->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + fgSizerShapeType->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_LengthPadToDieCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_LengthPadToDieCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + fgSizerShapeType->Add( m_LengthPadToDieCtrl, 0, wxEXPAND|wxALL, 5 ); m_PadLengthDie_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadLengthDie_Unit->Wrap( -1 ); @@ -239,7 +236,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_staticModuleRotValue = new wxStaticText( m_panelGeneral, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticModuleRotValue->Wrap( -1 ); - fgSizer4->Add( m_staticModuleRotValue, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + fgSizer4->Add( m_staticModuleRotValue, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticTitleModuleSide = new wxStaticText( m_panelGeneral, wxID_ANY, _("Board side:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTitleModuleSide->Wrap( -1 ); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index e57b6f7582..d66d693f79 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -288,7 +288,7 @@ fgSizerPadType wxFLEX_GROWMODE_SPECIFIED none - 0 + 4 0 5 @@ -640,7 +640,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -723,7 +723,7 @@ 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 1 @@ -809,6 +809,177 @@ + + 5 + wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Shape: + + 0 + + + 0 + + 1 + m_staticText45 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Circular" "Oval" "Rectangular" "Trapezoidal" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PadShape + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnPadShapeSelection + + + + + + + + + + + + + + + + + + + + + + + + @@ -825,7 +996,7 @@ fgSizerShapeType wxFLEX_GROWMODE_SPECIFIED none - 0 + 11 0 5 @@ -1341,187 +1512,6 @@ - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Shape: - - 0 - - - 0 - - 1 - m_staticText45 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Circular" "Oval" "Rectangular" "Trapezoidal" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_PadShape - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnPadShapeSelection - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 0 - protected - 0 - - 5 wxALIGN_CENTER_VERTICAL|wxLEFT @@ -1864,7 +1854,7 @@ 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -2375,7 +2365,7 @@ 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -3063,7 +3053,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -3146,7 +3136,7 @@ 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 1 @@ -3894,7 +3884,7 @@ 5 - wxTOP|wxRIGHT|wxLEFT|wxEXPAND + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index 610ab81dcf..42345f938d 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -56,14 +56,14 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxTextCtrl* m_PadNetNameCtrl; wxStaticText* m_staticText44; wxChoice* m_PadType; + wxStaticText* m_staticText45; + wxChoice* m_PadShape; wxStaticText* m_staticText4; wxTextCtrl* m_PadPosition_X_Ctrl; wxStaticText* m_PadPosX_Unit; wxStaticText* m_staticText41; wxTextCtrl* m_PadPosition_Y_Ctrl; wxStaticText* m_PadPosY_Unit; - wxStaticText* m_staticText45; - wxChoice* m_PadShape; wxStaticText* m_staticText12; wxTextCtrl* m_ShapeSize_X_Ctrl; wxStaticText* m_PadShapeSizeX_Unit;