From ab73c80ee63f0a53faf25afa108a8c5301ca93d0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 Feb 2018 10:50:45 +0100 Subject: [PATCH] Dialog pad properties: minor fixes. Fix incorrect text for non flipped footprints. minor cosmetic enhancements. --- pcbnew/dialogs/dialog_pad_properties.cpp | 2 ++ pcbnew/dialogs/dialog_pad_properties_base.cpp | 20 ++++++------ pcbnew/dialogs/dialog_pad_properties_base.fbp | 32 +++++++++---------- pcbnew/dialogs/dialog_pad_properties_base.h | 8 +++-- 4 files changed, 33 insertions(+), 29 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 1b5191ee62..b595ddb4b2 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -513,6 +513,8 @@ void DIALOG_PAD_PROPERTIES::initValues() if( m_isFlipped ) m_staticModuleSideValue->SetLabel( _( "Back side (footprint is mirrored)" ) ); + else + m_staticModuleSideValue->SetLabel( _( "Front side" ) ); // Diplay footprint rotation ( angles are in 0.1 degree ) MODULE* footprint = m_currentPad->GetParent(); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index 1bdecd822a..3843efa1c9 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Aug 4 2017) // http://www.wxformbuilder.org/ // -// PLEASE DO *NOT* EDIT THIS FILE! +// PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "widgets/text_ctrl_eval.h" @@ -276,17 +276,17 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind fgSizer4->SetFlexibleDirection( wxBOTH ); fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticModuleSideValue = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Front side (footprint is mirrored)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticModuleSideValue = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Back side (footprint is mirrored)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticModuleSideValue->Wrap( -1 ); - fgSizer4->Add( m_staticModuleSideValue, 0, wxBOTTOM, 5 ); + fgSizer4->Add( m_staticModuleSideValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_staticTitleModuleRot = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTitleModuleRot->Wrap( -1 ); - fgSizer4->Add( m_staticTitleModuleRot, 1, wxBOTTOM, 5 ); + fgSizer4->Add( m_staticTitleModuleRot, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_staticModuleRotValue = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("180.0"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticModuleRotValue->Wrap( -1 ); - fgSizer4->Add( m_staticModuleRotValue, 0, wxBOTTOM, 5 ); + fgSizer4->Add( m_staticModuleRotValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); sbSizeModuleInfo->Add( fgSizer4, 0, wxEXPAND, 5 ); @@ -361,12 +361,12 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_FlippedWarningSizer->Add( m_FlippedWarningIcon, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 6 ); - m_staticText86 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Parent footprint on board is flipped.\nLayers will be reversed."), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText86->Wrap( 150 ); - m_FlippedWarningSizer->Add( m_staticText86, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 10 ); + m_staticTextFlippedWarning = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Parent footprint on board is flipped.\nLayers will be reversed."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFlippedWarning->Wrap( 150 ); + m_FlippedWarningSizer->Add( m_staticTextFlippedWarning, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 10 ); - m_LayersSizer->Add( m_FlippedWarningSizer, 1, wxEXPAND, 5 ); + m_LayersSizer->Add( m_FlippedWarningSizer, 0, wxEXPAND, 5 ); wxBoxSizer* bSizer11; bSizer11 = new wxBoxSizer( wxHORIZONTAL ); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index 1fc99e3734..46f56e20a3 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -4943,7 +4943,7 @@ 0 5 - wxBOTTOM + wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -4973,7 +4973,7 @@ 0 0 wxID_ANY - Front side (footprint is mirrored) + Back side (footprint is mirrored) 0 @@ -5026,8 +5026,8 @@ 5 - wxBOTTOM - 1 + wxBOTTOM|wxRIGHT|wxLEFT + 0 1 1 @@ -5109,7 +5109,7 @@ 5 - wxBOTTOM + wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -5200,7 +5200,7 @@ 5 wxALL|wxEXPAND 4 - + bSizer10 wxVERTICAL @@ -6006,11 +6006,11 @@ - + 5 wxALL|wxEXPAND 0 - + wxID_ANY Layers @@ -6022,7 +6022,7 @@ 5 wxEXPAND - 1 + 0 m_FlippedWarningSizer @@ -6111,8 +6111,8 @@ 10 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT - 1 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND + 0 1 1 @@ -6149,7 +6149,7 @@ 0 1 - m_staticText86 + m_staticTextFlippedWarning 1 @@ -6194,11 +6194,11 @@ - + 5 wxEXPAND 0 - + bSizer11 wxHORIZONTAL @@ -6376,11 +6376,11 @@ - + 5 wxALL|wxEXPAND 0 - + wxID_ANY Technical Layers diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index 1c1ffb0f41..3398f59b72 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Aug 4 2017) // http://www.wxformbuilder.org/ // -// PLEASE DO *NOT* EDIT THIS FILE! +// PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #ifndef __DIALOG_PAD_PROPERTIES_BASE_H__ @@ -11,7 +11,9 @@ #include #include #include +class DIALOG_SHIM; class TEXT_CTRL_EVAL; +class wxListView; #include "dialog_shim.h" #include @@ -127,7 +129,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxStaticText* m_PadDrill_Y_Unit; wxBoxSizer* m_FlippedWarningSizer; wxStaticBitmap* m_FlippedWarningIcon; - wxStaticText* m_staticText86; + wxStaticText* m_staticTextFlippedWarning; wxStaticText* m_staticText511; wxChoice* m_rbCopperLayersSel; wxCheckBox* m_PadLayerAdhCmp;