From d650cca088befafb9ee8c5e8db223b14b3709547 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sat, 29 Jun 2019 09:36:29 -0700 Subject: [PATCH] Enforcing rational limits on length tuner The length tuning dialog needed validators on close to prevent negative and percentages >100% Fixes: lp:1834734 * https://bugs.launchpad.net/kicad/+bug/1834734 (cherry picked from commit 3974c6fd894a36b84eed2242eac5fe5c181abd9d) --- common/base_units.cpp | 8 + include/common.h | 1 + .../dialog_pns_length_tuning_settings.cpp | 34 +- .../dialog_pns_length_tuning_settings.h | 3 + ...dialog_pns_length_tuning_settings_base.cpp | 108 +-- ...dialog_pns_length_tuning_settings_base.fbp | 643 +----------------- .../dialog_pns_length_tuning_settings_base.h | 18 +- 7 files changed, 118 insertions(+), 697 deletions(-) diff --git a/common/base_units.cpp b/common/base_units.cpp index 7857f2f176..2717c9cddd 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -266,6 +266,10 @@ wxString StringFromValue( EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, b stringValue += wxT( " deg" ); break; + case PERCENT: + stringValue += wxT( "%" ); + break; + case UNSCALED_UNITS: break; } @@ -294,6 +298,7 @@ double From_User_Unit( EDA_UNITS_T aUnits, double aValue, bool aUseMils ) default: case UNSCALED_UNITS: + case PERCENT: return aValue; } } @@ -442,6 +447,9 @@ wxString GetAbbreviatedUnitsLabel( EDA_UNITS_T aUnit, bool aUseMils ) case MILLIMETRES: return _( "mm" ); + case PERCENT: + return _( "%" ); + case UNSCALED_UNITS: return wxEmptyString; diff --git a/include/common.h b/include/common.h index 3d565d9558..a3fd9f2924 100644 --- a/include/common.h +++ b/include/common.h @@ -159,6 +159,7 @@ enum EDA_UNITS_T { MILLIMETRES = 1, UNSCALED_UNITS = 2, DEGREES = 3, + PERCENT = 4, }; diff --git a/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp b/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp index eb6d96b243..72e9cc9a85 100644 --- a/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp +++ b/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp @@ -29,22 +29,22 @@ #include #include -// TODO validators - DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( EDA_DRAW_FRAME* aParent, PNS::MEANDER_SETTINGS& aSettings, PNS::ROUTER_MODE aMode ) : DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( aParent ), - m_minAmpl( aParent, m_minAmplLabel, m_minAmplText, m_minAmplUnit ), - m_maxAmpl( aParent, m_maxAmplLabel, m_maxAmplText, m_maxAmplUnit ), - m_spacing( aParent, m_spacingLabel, m_spacingText, m_spacingUnit ), + m_minAmpl( aParent, m_minAmplLabel, m_minAmplText, m_minAmplUnit, true ), + m_maxAmpl( aParent, m_maxAmplLabel, m_maxAmplText, m_maxAmplUnit, true ), + m_spacing( aParent, m_spacingLabel, m_spacingText, m_spacingUnit, true ), m_targetLength( aParent, m_targetLengthLabel, m_targetLengthText, m_targetLengthUnit ), + m_radius( aParent, m_radiusLabel, m_radiusText, m_radiusUnit, false, false ), m_settings( aSettings ), m_mode( aMode ) { m_stdButtonsOK->SetDefault(); m_targetLengthText->SetSelection( -1, -1 ); m_targetLengthText->SetFocus(); + m_radius.SetUnits( PERCENT ); GetSizer()->SetSizeHints(this); Centre(); @@ -53,6 +53,7 @@ DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS( EDA_DRAW_F bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataToWindow() { + if( !wxDialog::TransferDataToWindow() ) return false; @@ -104,16 +105,31 @@ bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataToWindow() } -bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataFromWindow() +bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::AcceptOptions( ) { - if( !wxDialog::TransferDataToWindow() ) + if( !m_minAmpl.Validate( 0, INT_MAX ) ) + return false; + if( !m_maxAmpl.Validate( m_minAmpl.GetValue(), INT_MAX ) ) + return false; + if( !m_spacing.Validate( 0, INT_MAX ) ) + return false; + if( !m_targetLength.Validate( 0, INT_MAX ) ) + return false; + if( !m_radius.Validate( 0, 100 ) ) + return false; + + return true; +} + +bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataFromWindow() +{ + if( !AcceptOptions() || !wxDialog::TransferDataToWindow() ) return false; - // fixme: use validators and TransferDataFromWindow m_settings.m_minAmplitude = m_minAmpl.GetValue(); m_settings.m_maxAmplitude = m_maxAmpl.GetValue(); m_settings.m_spacing = m_spacing.GetValue(); - m_settings.m_cornerRadiusPercentage = wxAtoi( m_radiusText->GetValue() ); + m_settings.m_cornerRadiusPercentage = m_radius.GetValue(); if( m_mode == PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW ) m_settings.m_targetSkew = m_targetLength.GetValue(); diff --git a/pcbnew/dialogs/dialog_pns_length_tuning_settings.h b/pcbnew/dialogs/dialog_pns_length_tuning_settings.h index be3734aed2..0306efe1a7 100644 --- a/pcbnew/dialogs/dialog_pns_length_tuning_settings.h +++ b/pcbnew/dialogs/dialog_pns_length_tuning_settings.h @@ -47,10 +47,13 @@ private: bool TransferDataToWindow() override; bool TransferDataFromWindow() override; + bool AcceptOptions(); + UNIT_BINDER m_minAmpl; UNIT_BINDER m_maxAmpl; UNIT_BINDER m_spacing; UNIT_BINDER m_targetLength; + UNIT_BINDER m_radius; PNS::MEANDER_SETTINGS& m_settings; PNS::ROUTER_MODE m_mode; diff --git a/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.cpp b/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.cpp index b00bb883f1..6c2623edbc 100644 --- a/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.cpp +++ b/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Apr 23 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -14,160 +14,160 @@ DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE::DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); - + wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); - + wxStaticBoxSizer* sbSizerUpper; sbSizerUpper = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Length / Skew") ), wxVERTICAL ); - + wxFlexGridSizer* fgSizerLenSkew; fgSizerLenSkew = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizerLenSkew->AddGrowableCol( 1 ); fgSizerLenSkew->SetFlexibleDirection( wxBOTH ); fgSizerLenSkew->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_staticText4 = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Tune from:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText4->Wrap( -1 ); fgSizerLenSkew->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - + wxArrayString m_choicePathFromChoices; m_choicePathFrom = new wxChoice( sbSizerUpper->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePathFromChoices, 0 ); m_choicePathFrom->SetSelection( 0 ); fgSizerLenSkew->Add( m_choicePathFrom, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - + + fgSizerLenSkew->Add( 0, 0, 0, 0, 5 ); - + m_staticText15 = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Tune to:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText15->Wrap( -1 ); fgSizerLenSkew->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - + wxArrayString m_choice4Choices; m_choice4 = new wxChoice( sbSizerUpper->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choice4Choices, 0 ); m_choice4->SetSelection( 0 ); fgSizerLenSkew->Add( m_choice4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - + + fgSizerLenSkew->Add( 0, 0, 0, 0, 5 ); - + m_staticText3 = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Constraint:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText3->Wrap( -1 ); fgSizerLenSkew->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - + wxString m_constraintSourceChoices[] = { _("From Design Rules"), _("Manual") }; int m_constraintSourceNChoices = sizeof( m_constraintSourceChoices ) / sizeof( wxString ); m_constraintSource = new wxChoice( sbSizerUpper->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_constraintSourceNChoices, m_constraintSourceChoices, 0 ); m_constraintSource->SetSelection( 1 ); m_constraintSource->Enable( false ); - + fgSizerLenSkew->Add( m_constraintSource, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - + + fgSizerLenSkew->Add( 0, 0, 0, 0, 5 ); - + m_targetLengthLabel = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("Target length:"), wxDefaultPosition, wxDefaultSize, 0 ); m_targetLengthLabel->Wrap( -1 ); fgSizerLenSkew->Add( m_targetLengthLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - + m_targetLengthText = new wxTextCtrl( sbSizerUpper->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerLenSkew->Add( m_targetLengthText, 0, wxALL|wxEXPAND, 5 ); - + m_targetLengthUnit = new wxStaticText( sbSizerUpper->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_targetLengthUnit->Wrap( -1 ); fgSizerLenSkew->Add( m_targetLengthUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - + + sbSizerUpper->Add( fgSizerLenSkew, 1, wxEXPAND, 5 ); - - + + bMainSizer->Add( sbSizerUpper, 0, wxEXPAND|wxALL, 10 ); - + wxStaticBoxSizer* sbSizerLower; sbSizerLower = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Meandering") ), wxHORIZONTAL ); - + m_legend = new wxStaticBitmap( sbSizerLower->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); sbSizerLower->Add( m_legend, 0, wxALL|wxEXPAND, 5 ); - + wxFlexGridSizer* fgSizer3; fgSizer3 = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizer3->AddGrowableCol( 1 ); fgSizer3->SetFlexibleDirection( wxBOTH ); fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_minAmplLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Min amplitude (Amin):"), wxDefaultPosition, wxDefaultSize, 0 ); m_minAmplLabel->Wrap( -1 ); fgSizer3->Add( m_minAmplLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - + m_minAmplText = new wxTextCtrl( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_minAmplText, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_minAmplUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_minAmplUnit->Wrap( -1 ); fgSizer3->Add( m_minAmplUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - + m_maxAmplLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Max amplitude (Amax):"), wxDefaultPosition, wxDefaultSize, 0 ); m_maxAmplLabel->Wrap( -1 ); fgSizer3->Add( m_maxAmplLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_maxAmplText = new wxTextCtrl( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_maxAmplText, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_maxAmplUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_maxAmplUnit->Wrap( -1 ); fgSizer3->Add( m_maxAmplUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - + m_spacingLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); m_spacingLabel->Wrap( -1 ); fgSizer3->Add( m_spacingLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_spacingText = new wxTextCtrl( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_spacingText, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_spacingUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_spacingUnit->Wrap( -1 ); fgSizer3->Add( m_spacingUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - + m_staticText14 = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Miter style:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText14->Wrap( -1 ); fgSizer3->Add( m_staticText14, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - + wxString m_miterStyleChoices[] = { _("45 degree"), _("arc") }; int m_miterStyleNChoices = sizeof( m_miterStyleChoices ) / sizeof( wxString ); m_miterStyle = new wxChoice( sbSizerLower->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_miterStyleNChoices, m_miterStyleChoices, 0 ); m_miterStyle->SetSelection( 0 ); fgSizer3->Add( m_miterStyle, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticText13 = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Miter radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13->Wrap( -1 ); - fgSizer3->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - + + m_radiusLabel = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("Miter radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radiusLabel->Wrap( -1 ); + fgSizer3->Add( m_radiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_radiusText = new TEXT_CTRL_EVAL( sbSizerLower->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_radiusText, 0, wxALL|wxEXPAND, 5 ); - + m_radiusUnit = new wxStaticText( sbSizerLower->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); m_radiusUnit->Wrap( -1 ); fgSizer3->Add( m_radiusUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - + + sbSizerLower->Add( fgSizer3, 1, wxEXPAND, 5 ); - - + + bMainSizer->Add( sbSizerLower, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); - + m_stdButtons = new wxStdDialogButtonSizer(); m_stdButtonsOK = new wxButton( this, wxID_OK ); m_stdButtons->AddButton( m_stdButtonsOK ); m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); m_stdButtons->AddButton( m_stdButtonsCancel ); m_stdButtons->Realize(); - + bMainSizer->Add( m_stdButtons, 0, wxEXPAND|wxALL, 5 ); - - + + this->SetSizer( bMainSizer ); this->Layout(); bMainSizer->Fit( this ); diff --git a/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.fbp b/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.fbp index 814829542f..7bc710c5e0 100644 --- a/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.fbp +++ b/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,8 @@ dialog_pns_length_tuning_settings_base 1000 none + + 1 DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE @@ -24,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -52,42 +55,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bMainSizer @@ -105,7 +72,6 @@ wxVERTICAL 1 none - 5 wxEXPAND @@ -155,6 +121,7 @@ 0 wxID_ANY Tune from: + 0 0 @@ -180,29 +147,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -267,30 +211,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -336,6 +256,7 @@ 0 wxID_ANY Tune to: + 0 0 @@ -361,29 +282,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -448,30 +346,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -517,6 +391,7 @@ 0 wxID_ANY Constraint: + 0 0 @@ -542,29 +417,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -629,30 +481,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -698,6 +526,7 @@ 0 wxID_ANY Target length: + 0 0 @@ -723,29 +552,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -810,33 +616,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -872,6 +651,7 @@ 0 wxID_ANY unit + 0 0 @@ -897,29 +677,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -938,7 +695,6 @@ wxHORIZONTAL 1 none - 5 wxALL|wxEXPAND @@ -995,29 +751,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -1069,6 +802,7 @@ 0 wxID_ANY Min amplitude (Amin): + 0 0 @@ -1094,29 +828,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1181,33 +892,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1243,6 +927,7 @@ 0 wxID_ANY unit + 0 0 @@ -1268,29 +953,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1326,6 +988,7 @@ 0 wxID_ANY Max amplitude (Amax): + 0 0 @@ -1351,29 +1014,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1438,33 +1078,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1500,6 +1113,7 @@ 0 wxID_ANY unit + 0 0 @@ -1525,29 +1139,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1583,6 +1174,7 @@ 0 wxID_ANY Spacing (s): + 0 0 @@ -1608,29 +1200,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1695,33 +1264,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1757,6 +1299,7 @@ 0 wxID_ANY unit + 0 0 @@ -1782,29 +1325,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1840,6 +1360,7 @@ 0 wxID_ANY Miter style: + 0 0 @@ -1865,29 +1386,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -1952,30 +1450,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -2021,6 +1495,7 @@ 0 wxID_ANY Miter radius (r): + 0 0 @@ -2028,7 +1503,7 @@ 0 1 - m_staticText13 + m_radiusLabel 1 @@ -2046,29 +1521,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -2133,33 +1585,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2195,6 +1620,7 @@ 0 wxID_ANY % + 0 0 @@ -2220,29 +1646,6 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - @@ -2265,14 +1668,6 @@ m_stdButtons protected - - - - - - - - diff --git a/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.h b/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.h index dc48625c27..c88dabd0c6 100644 --- a/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.h +++ b/pcbnew/dialogs/dialog_pns_length_tuning_settings_base.h @@ -1,12 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Apr 23 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE_H__ -#define __DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE_H__ +#pragma once #include #include @@ -40,7 +39,7 @@ class TEXT_CTRL_EVAL; class DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE : public DIALOG_SHIM { private: - + protected: wxStaticText* m_staticText4; wxChoice* m_choicePathFrom; @@ -63,18 +62,17 @@ class DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE : public DIALOG_SHIM wxStaticText* m_spacingUnit; wxStaticText* m_staticText14; wxChoice* m_miterStyle; - wxStaticText* m_staticText13; + wxStaticText* m_radiusLabel; TEXT_CTRL_EVAL* m_radiusText; wxStaticText* m_radiusUnit; wxStdDialogButtonSizer* m_stdButtons; wxButton* m_stdButtonsOK; wxButton* m_stdButtonsCancel; - + public: - - DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Trace Length Tuning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Trace Length Tuning"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE(); - + }; -#endif //__DIALOG_PNS_LENGTH_TUNING_SETTINGS_BASE_H__