From 10442b98dfba3977688693dc07f9c67b74aa651e Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 11 Feb 2021 11:25:49 -0800 Subject: [PATCH] Unify thickness The removal of the pcbnew general section was meant for v6 but passed the deadline. This removes the duplication of thickness. We do not allow the thickness to be different between nominal and stackup, so keeping separate text fields is unnecesarily confusing to users --- .../class_board_stackup.cpp | 2 +- .../class_board_stackup.h | 2 +- .../panel_board_stackup.cpp | 167 +---- .../panel_board_stackup.h | 6 - .../panel_board_stackup_base.cpp | 83 +-- .../panel_board_stackup_base.fbp | 643 +++++++----------- .../panel_board_stackup_base.h | 26 +- 7 files changed, 297 insertions(+), 632 deletions(-) diff --git a/pcbnew/board_stackup_manager/class_board_stackup.cpp b/pcbnew/board_stackup_manager/class_board_stackup.cpp index 351ddffaf6..3e403df128 100644 --- a/pcbnew/board_stackup_manager/class_board_stackup.cpp +++ b/pcbnew/board_stackup_manager/class_board_stackup.cpp @@ -380,7 +380,7 @@ BOARD_STACKUP_ITEM* BOARD_STACKUP::GetStackupLayer( int aIndex ) } -int BOARD_STACKUP::BuildBoardTicknessFromStackup() const +int BOARD_STACKUP::BuildBoardThicknessFromStackup() const { // return the board thickness from the thickness of BOARD_STACKUP_ITEM list int thickness = 0; diff --git a/pcbnew/board_stackup_manager/class_board_stackup.h b/pcbnew/board_stackup_manager/class_board_stackup.h index 4fe174ac66..ecb5790459 100644 --- a/pcbnew/board_stackup_manager/class_board_stackup.h +++ b/pcbnew/board_stackup_manager/class_board_stackup.h @@ -270,7 +270,7 @@ public: int GetCount() const { return (int) m_list.size(); } /// @return the board thickness ( in UI) from the thickness of BOARD_STACKUP_ITEM list - int BuildBoardTicknessFromStackup() const; + int BuildBoardThicknessFromStackup() const; /// Add a new item in stackup layer void Add( BOARD_STACKUP_ITEM* aItem ) { m_list.push_back( aItem ); } diff --git a/pcbnew/board_stackup_manager/panel_board_stackup.cpp b/pcbnew/board_stackup_manager/panel_board_stackup.cpp index b16f0521b6..619fb49916 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup.cpp +++ b/pcbnew/board_stackup_manager/panel_board_stackup.cpp @@ -81,7 +81,6 @@ PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP( PAGED_DIALOG* aParent, PCB m_units = aFrame->GetUserUnits(); m_enabledLayers = m_board->GetEnabledLayers() & BOARD_STACKUP::StackupAllowedBrdLayers(); - m_stackupMismatch = false; // Calculates a good size for color swatches (icons) in this dialog wxClientDC dc( this ); @@ -105,7 +104,6 @@ PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP( PAGED_DIALOG* aParent, PCB m_bitmapLockThickness->SetBitmap( KiScaledBitmap( locked_xpm, aFrame ) ); // Gives a minimal size of wxTextCtrl showing dimensions+units - m_thicknessCtrl->SetMinSize( m_numericTextCtrlSize ); m_tcCTValue->SetMinSize( m_numericTextCtrlSize ); // Prepare dielectric layer type: layer type keyword is "core" or "prepreg" @@ -331,21 +329,12 @@ void PANEL_SETUP_BOARD_STACKUP::onUpdateThicknessValue( wxUpdateUIEvent& event ) } -int PANEL_SETUP_BOARD_STACKUP::GetPcbThickness() -{ - return ValueFromString( m_units, m_thicknessCtrl->GetValue() ); -} - - void PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard( bool aFullSync ) { const BOARD_STACKUP& brd_stackup = m_brdSettings->GetStackupDescriptor(); if( aFullSync ) { - int thickness = m_brdSettings->GetBoardThickness(); - m_thicknessCtrl->SetValue( StringFromValue( m_units, thickness, true ) ); - m_rbDielectricConstraint->SetSelection( brd_stackup.m_HasDielectricConstrains ? 1 : 0 ); m_choiceEdgeConn->SetSelection( brd_stackup.m_EdgeConnectorConstraints ); m_cbCastellatedPads->SetValue( brd_stackup.m_CastellatedPads ); @@ -883,23 +872,10 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup() LSET layersList = m_panelLayers->GetUILayerMask() & BOARD_STACKUP::StackupAllowedBrdLayers(); if( m_enabledLayers != layersList ) - { - for( size_t i = 0; i < m_parentDialog->GetTreebook()->GetPageCount(); ++i ) - { - if( m_parentDialog->GetTreebook()->GetPage( i ) == this ) - { - m_parentDialog->GetTreebook()->SetSelection( i ); - break; - } - } - - m_stackupMismatch = true; - return false; - } + OnLayersOptionsChanged( m_panelLayers->GetUILayerMask() ); // The board thickness and the thickness from stackup settings should be compatible // so verify that compatibility - int pcbThickness = GetPcbThickness() ; int stackup_thickness = 0; wxString txt; @@ -1042,28 +1018,6 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup() row++; } - int delta = std::abs( stackup_thickness - pcbThickness ); - double relative_error = pcbThickness ? (double)delta / pcbThickness : 1; - const double relative_error_max = 0.01; - - // warn user if relative_error > 0.01 - if( relative_error > relative_error_max ) - { - wxString msg; - msg.Printf( _( "Board thickness %s differs from stackup thickness %s\n" - "Allowed max error %s" ), - StringFromValue( m_units, pcbThickness ), - StringFromValue( m_units, stackup_thickness ), - StringFromValue( m_units, KiROUND( relative_error_max * pcbThickness) ) ); - - if( !error_msg.IsEmpty() ) - error_msg << "\n"; - - error_msg << msg; - - success = false; - } - if( !success ) { wxMessageBox( error_msg, _( "Errors" ) ); @@ -1111,10 +1065,11 @@ bool PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow() brd_stackup.FormatBoardStackup( &new_stackup, m_board, 0 ); bool modified = old_stackup.GetString() != new_stackup.GetString(); + int thickness = brd_stackup.BuildBoardThicknessFromStackup(); - if( m_brdSettings->GetBoardThickness() != GetPcbThickness() ) + if( m_brdSettings->GetBoardThickness() != thickness ) { - m_brdSettings->SetBoardThickness( GetPcbThickness() ); + m_brdSettings->SetBoardThickness( thickness ); modified = true; } @@ -1169,93 +1124,6 @@ void PANEL_SETUP_BOARD_STACKUP::OnLayersOptionsChanged( LSET aNewLayerSet ) } -void PANEL_SETUP_BOARD_STACKUP::onCalculateDielectricThickness( wxCommandEvent& event ) -{ - // Collect thickness of all layers but dielectric - int thickness = 0; - int fixed_thickness_cnt = 0; - bool thickness_error = false; // True if a locked thickness value in list is < 0 - int dielectricCount = 0; - - for( BOARD_STACKUP_ROW_UI_ITEM& ui_item : m_rowUiItemsList ) - { - BOARD_STACKUP_ITEM* item = ui_item.m_Item; - int sublayer_idx = ui_item.m_SubItem; - - if( !item->IsThicknessEditable() || !ui_item.m_isEnabled ) - continue; - - if( item->GetType() == BS_ITEM_TYPE_DIELECTRIC ) - { - dielectricCount++; - - wxCheckBox* checkBox = static_cast( ui_item.m_ThicknessLockCtrl ); - - if( !checkBox->GetValue() ) // Only not locked dielectric thickness can be modified - continue; - else - { - fixed_thickness_cnt++; - - if( item->GetThickness( sublayer_idx ) < 0 ) - thickness_error = true; - } - } - - thickness += item->GetThickness( sublayer_idx ); - } - - if( thickness_error ) - { - wxMessageBox( _( "A locked dielectric thickness is < 0\n" - "Unlock it or change its thickness") ); - return; - } - - // the number of adjustable dielectric layers must obviously be > 0 - // So verify the user has at least one dielectric layer free - int adjustableDielectricCount = dielectricCount - fixed_thickness_cnt; - - if( adjustableDielectricCount <= 0 ) - { - wxMessageBox( _( "Cannot calculate dielectric thickness\n" - "At least one dielectric layer must be not locked") ); - return; - } - - int dielectric_thickness = GetPcbThickness() - thickness; - - if( dielectric_thickness <= 0 ) // fixed thickness is too big: cannot calculate free thickness - { - wxMessageBox( _( "Cannot calculate dielectric thickness\n" - "Fixed thickness too big or board thickness too small") ); - return; - } - - dielectric_thickness /= adjustableDielectricCount; - - // Update items thickness, and the values displayed on screen - for( BOARD_STACKUP_ROW_UI_ITEM& ui_item : m_rowUiItemsList ) - { - BOARD_STACKUP_ITEM* item = ui_item.m_Item; - int sublayer_idx = ui_item.m_SubItem; - - if( item->GetType() == BS_ITEM_TYPE_DIELECTRIC && ui_item.m_isEnabled ) - { - wxCheckBox* checkBox = static_cast( ui_item.m_ThicknessLockCtrl ); - - if( !checkBox->GetValue() ) // Not locked thickness: can be modified - { - item->SetThickness( dielectric_thickness, sublayer_idx ); - wxTextCtrl* textCtrl = static_cast( ui_item.m_ThicknessCtrl ); - textCtrl->SetValue( StringFromValue( m_units, - item->GetThickness( sublayer_idx ) ) ); - } - } - } -} - - void PANEL_SETUP_BOARD_STACKUP::onColorSelected( wxCommandEvent& event ) { int idx = event.GetSelection(); @@ -1548,30 +1416,3 @@ void drawBitmap( wxBitmap& aBitmap, wxColor aColor ) } -void PANEL_SETUP_BOARD_STACKUP::OnUpdateUI( wxUpdateUIEvent& event ) -{ - // Handle an error. This is delayed to OnUpdateUI so that we can change the focus - // even when the original validation was triggered from a killFocus event, and so - // that the corresponding notebook page can be shown in the background when triggered - // from an OK. - if( m_stackupMismatch ) - { - m_stackupMismatch = false; - - wxRichMessageDialog dlg( this, - _( "Physical stackup has not been updated to match layer count." ), - _( "Update Physical Stackup" ), - wxOK | wxCENTER | wxICON_WARNING ); - dlg.ShowCheckBox( _( "Update dielectric thickness from board thickness" ), true ); - - dlg.ShowModal(); - - if( dlg.IsCheckBoxChecked() ) - { - wxCommandEvent dummy; - onCalculateDielectricThickness( dummy ); - } - } -} - - diff --git a/pcbnew/board_stackup_manager/panel_board_stackup.h b/pcbnew/board_stackup_manager/panel_board_stackup.h index 52a049e44f..79bba5ee7d 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup.h +++ b/pcbnew/board_stackup_manager/panel_board_stackup.h @@ -171,8 +171,6 @@ private: bool transferDataFromUIToStackup(); void onUpdateThicknessValue( wxUpdateUIEvent& event ) override; - void onCalculateDielectricThickness( wxCommandEvent& event ) override; - void onColorSelected( wxCommandEvent& event ); void onMaterialChange( wxCommandEvent& event ); void onThicknessChange( wxCommandEvent& event ); @@ -180,7 +178,6 @@ private: void onAddDielectricLayer( wxCommandEvent& event ) override; void onRemoveDielectricLayer( wxCommandEvent& event ) override; void onRemoveDielUI( wxUpdateUIEvent& event ) override; - void OnUpdateUI( wxUpdateUIEvent& event ) override; /** Update the icons color (swatches in first grid column) * @param aRow is the row (index in m_rowUiItemsList) that manages the icon to update. @@ -243,9 +240,6 @@ private: // when building the BOARD_STACKUP_ITEM list editor and connected to command events // Used to disconnect event handlers std::vector m_controlItemsList; - - bool m_stackupMismatch; // flags an error when the stackup was not updated - // to match changes made to the enabled layers }; #endif // #ifndef PANEL_SETUP_BOARD_STACKUP_H diff --git a/pcbnew/board_stackup_manager/panel_board_stackup_base.cpp b/pcbnew/board_stackup_manager/panel_board_stackup_base.cpp index 3e6933e68f..504138132e 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup_base.cpp +++ b/pcbnew/board_stackup_manager/panel_board_stackup_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -14,37 +14,6 @@ PANEL_SETUP_BOARD_STACKUP_BASE::PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizerBrdThickness; - bSizerBrdThickness = new wxBoxSizer( wxHORIZONTAL ); - - m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Board thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_thicknessLabel->Wrap( -1 ); - bSizerBrdThickness->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerBrdThickness->Add( m_thicknessCtrl, 0, wxALL, 5 ); - - - bSizerBrdThickness->Add( 20, 0, 0, 0, 5 ); - - m_staticTextCT = new wxStaticText( this, wxID_ANY, _("Current thickness from stackup:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCT->Wrap( -1 ); - bSizerBrdThickness->Add( m_staticTextCT, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_tcCTValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - bSizerBrdThickness->Add( m_tcCTValue, 0, wxALL, 5 ); - - - bSizerBrdThickness->Add( 5, 0, 0, 0, 5 ); - - m_buttonSetDielectricThickness = new wxButton( this, wxID_ANY, _("Set Dielectric Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSetDielectricThickness->SetToolTip( _("Set thickness of all not locked dielectric layers.\nThe thickness will be the same for all not locked dielectric layers.") ); - - bSizerBrdThickness->Add( m_buttonSetDielectricThickness, 0, wxALL, 5 ); - - - bMainSizer->Add( bSizerBrdThickness, 0, wxEXPAND|wxALL, 5 ); - m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); @@ -117,7 +86,7 @@ PANEL_SETUP_BOARD_STACKUP_BASE::PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent bSizer5->Add( m_scGridWin, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_sizerStackup->Add( bSizer5, 1, wxEXPAND, 5 ); + m_sizerStackup->Add( bSizer5, 3, wxEXPAND, 5 ); wxBoxSizer* bSizerRight; bSizerRight = new wxBoxSizer( wxVERTICAL ); @@ -175,15 +144,49 @@ PANEL_SETUP_BOARD_STACKUP_BASE::PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent bSizerRight->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonExport = new wxButton( this, wxID_ANY, _("Export to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerRight->Add( m_buttonExport, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_sizerStackup->Add( bSizerRight, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_sizerStackup->Add( bSizerRight, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bMainSizer->Add( m_sizerStackup, 1, wxEXPAND, 5 ); + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizerBrdThickness; + bSizerBrdThickness = new wxBoxSizer( wxHORIZONTAL ); + + m_staticTextCT = new wxStaticText( this, wxID_ANY, _("Board thickness from stackup:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_staticTextCT->Wrap( -1 ); + bSizerBrdThickness->Add( m_staticTextCT, 2, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_tcCTValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + bSizerBrdThickness->Add( m_tcCTValue, 1, wxALL, 5 ); + + + bSizer6->Add( bSizerBrdThickness, 2, wxEXPAND|wxALL, 5 ); + + + bSizer6->Add( 0, 0, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer7->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_buttonExport = new wxButton( this, wxID_ANY, _("Export to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer7->Add( m_buttonExport, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + + bSizer7->Add( 0, 0, 1, wxEXPAND, 5 ); + + + bSizer6->Add( bSizer7, 1, wxEXPAND, 5 ); + + + bMainSizer->Add( bSizer6, 0, wxEXPAND, 5 ); + this->SetSizer( bMainSizer ); this->Layout(); @@ -191,11 +194,10 @@ PANEL_SETUP_BOARD_STACKUP_BASE::PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent // Connect Events this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::OnUpdateUI ) ); - m_thicknessCtrl->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onUpdateThicknessValue ), NULL, this ); - m_buttonSetDielectricThickness->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onCalculateDielectricThickness ), NULL, this ); m_buttonAddDielectricLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onAddDielectricLayer ), NULL, this ); m_buttonRemoveDielectricLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielectricLayer ), NULL, this ); m_buttonRemoveDielectricLayer->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielUI ), NULL, this ); + m_tcCTValue->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onUpdateThicknessValue ), NULL, this ); m_buttonExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onExportToClipboard ), NULL, this ); } @@ -203,11 +205,10 @@ PANEL_SETUP_BOARD_STACKUP_BASE::~PANEL_SETUP_BOARD_STACKUP_BASE() { // Disconnect Events this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::OnUpdateUI ) ); - m_thicknessCtrl->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onUpdateThicknessValue ), NULL, this ); - m_buttonSetDielectricThickness->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onCalculateDielectricThickness ), NULL, this ); m_buttonAddDielectricLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onAddDielectricLayer ), NULL, this ); m_buttonRemoveDielectricLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielectricLayer ), NULL, this ); m_buttonRemoveDielectricLayer->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielUI ), NULL, this ); + m_tcCTValue->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onUpdateThicknessValue ), NULL, this ); m_buttonExport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onExportToClipboard ), NULL, this ); } diff --git a/pcbnew/board_stackup_manager/panel_board_stackup_base.fbp b/pcbnew/board_stackup_manager/panel_board_stackup_base.fbp index ce033f742a..c0f856bea0 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup_base.fbp +++ b/pcbnew/board_stackup_manager/panel_board_stackup_base.fbp @@ -57,362 +57,6 @@ bMainSizer wxVERTICAL none - - 5 - wxEXPAND|wxALL - 0 - - -1,-1 - bSizerBrdThickness - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Board thickness: - 0 - - 0 - - - 0 - - 1 - m_thicknessLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_thicknessCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - onUpdateThicknessValue - - - - 5 - - 0 - - 0 - protected - 20 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Current thickness from stackup: - 0 - - 0 - - - 0 - - 1 - m_staticTextCT - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_tcCTValue - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - - 0 - - 0 - protected - 5 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Set Dielectric Thickness - - 0 - - 0 - - - 0 - - 1 - m_buttonSetDielectricThickness - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - Set thickness of all not locked dielectric layers. The thickness will be the same for all not locked dielectric layers. - - wxFILTER_NONE - wxDefaultValidator - - - - - onCalculateDielectricThickness - - - - 10 wxEXPAND|wxRIGHT|wxLEFT @@ -480,20 +124,20 @@ m_sizerStackup wxHORIZONTAL protected - + 5 wxEXPAND - 1 - + 3 + bSizer5 wxVERTICAL none - + 5 wxEXPAND|wxTOP|wxBOTTOM|wxLEFT 1 - + 1 1 1 @@ -546,7 +190,7 @@ wxHSCROLL|wxVSCROLL - + 9 wxHORIZONTAL @@ -558,11 +202,11 @@ protected 0 0 - + 2 wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -619,11 +263,11 @@ -1 - + 5 wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -680,11 +324,11 @@ -1 - + 2 wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -741,11 +385,11 @@ -1 - + 2 wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -802,11 +446,11 @@ -1 - + 2 wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -863,11 +507,11 @@ -1 - + 5 wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -921,11 +565,11 @@ - + 2 wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -982,11 +626,11 @@ -1 - + 2 wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -1043,11 +687,11 @@ -1 - + 2 wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL 0 - + 1 1 1 @@ -1109,20 +753,20 @@ - + 5 wxEXPAND|wxRIGHT|wxLEFT - 0 - + 1 + bSizerRight wxVERTICAL none - + 5 wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT 0 - + 1 1 1 @@ -1184,11 +828,11 @@ - + 5 wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT 0 - + 1 1 1 @@ -1258,11 +902,11 @@ onAddDielectricLayer - + 5 wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND 0 - + 1 1 1 @@ -1333,11 +977,11 @@ onRemoveDielUI - + 5 wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT 0 - + 1 1 1 @@ -1391,11 +1035,11 @@ - + 5 wxEXPAND|wxTOP|wxRIGHT 0 - + wxID_ANY Board Finish @@ -1403,11 +1047,11 @@ wxVERTICAL 1 none - + 5 wxTOP|wxBOTTOM 0 - + 1 1 1 @@ -1467,11 +1111,11 @@ - + 5 wxBOTTOM 0 - + 1 1 1 @@ -1531,11 +1175,11 @@ - + 10 wxTOP|wxRIGHT 0 - + 1 1 1 @@ -1592,11 +1236,11 @@ -1 - + 2 wxEXPAND|wxTOP|wxBOTTOM 0 - + 1 1 1 @@ -1656,11 +1300,11 @@ - + 10 wxTOP 0 - + 1 1 1 @@ -1717,11 +1361,11 @@ -1 - + 2 wxEXPAND|wxTOP|wxBOTTOM 0 - + 1 1 1 @@ -1783,6 +1427,185 @@ + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer6 + wxHORIZONTAL + none + + 5 + wxEXPAND|wxALL + 2 + + -1,-1 + bSizerBrdThickness + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 2 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Board thickness from stackup: + 0 + + 0 + + + 0 + + 1 + m_staticTextCT + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_tcCTValue + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_READONLY + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + onUpdateThicknessValue + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + + bSizer7 + wxHORIZONTAL + none 5 wxEXPAND @@ -1867,6 +1690,16 @@ onExportToClipboard + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + diff --git a/pcbnew/board_stackup_manager/panel_board_stackup_base.h b/pcbnew/board_stackup_manager/panel_board_stackup_base.h index 495f21942f..365e4b56db 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup_base.h +++ b/pcbnew/board_stackup_manager/panel_board_stackup_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,25 +10,25 @@ #include #include #include -#include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include -#include -#include #include +#include #include #include +#include #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////// @@ -42,11 +42,6 @@ class PANEL_SETUP_BOARD_STACKUP_BASE : public wxPanel private: protected: - wxStaticText* m_thicknessLabel; - wxTextCtrl* m_thicknessCtrl; - wxStaticText* m_staticTextCT; - wxTextCtrl* m_tcCTValue; - wxButton* m_buttonSetDielectricThickness; wxStaticLine* m_staticline; wxBoxSizer* m_sizerStackup; wxScrolledWindow* m_scGridWin; @@ -70,15 +65,16 @@ class PANEL_SETUP_BOARD_STACKUP_BASE : public wxPanel wxChoice* m_choiceFinish; wxStaticText* m_staticTextEdgeConn; wxChoice* m_choiceEdgeConn; + wxStaticText* m_staticTextCT; + wxTextCtrl* m_tcCTValue; wxButton* m_buttonExport; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } - virtual void onUpdateThicknessValue( wxUpdateUIEvent& event ) { event.Skip(); } - virtual void onCalculateDielectricThickness( wxCommandEvent& event ) { event.Skip(); } virtual void onAddDielectricLayer( wxCommandEvent& event ) { event.Skip(); } virtual void onRemoveDielectricLayer( wxCommandEvent& event ) { event.Skip(); } virtual void onRemoveDielUI( wxUpdateUIEvent& event ) { event.Skip(); } + virtual void onUpdateThicknessValue( wxUpdateUIEvent& event ) { event.Skip(); } virtual void onExportToClipboard( wxCommandEvent& event ) { event.Skip(); }